docs: rename repo id to go-frp and update urls

This commit is contained in:
2026-01-25 19:35:21 +08:00
parent 61dd187a86
commit b696ddc0e5
2 changed files with 24 additions and 24 deletions

View File

@@ -24,7 +24,7 @@ jobs:
LATEST_TAG=$(curl -s https://api.github.com/repos/fatedier/frp/releases/latest | jq -r .tag_name)
LATEST_VERSION=${LATEST_TAG#v}
echo "Latest upstream version: $LATEST_VERSION"
CURRENT_TAG=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
if [ "$CURRENT_TAG" == "null" ]; then
CURRENT_VERSION="0.0.0"
@@ -32,7 +32,7 @@ jobs:
CURRENT_VERSION=${CURRENT_TAG#v}
fi
echo "Current repo version: $CURRENT_VERSION"
if [ "$LATEST_VERSION" == "$CURRENT_VERSION" ] && [ "${{ github.event_name }}" != "workflow_dispatch" ]; then
echo "Already up to date."
echo "build=false" >> $GITHUB_OUTPUT
@@ -68,12 +68,12 @@ jobs:
elif [ "$ARCH" == "aarch64" ]; then
GOARCH="arm64"
fi
mkdir -p ~/rpmbuild/SOURCES
# Download FRP binary
wget https://github.com/fatedier/frp/releases/download/v${VERSION}/frp_${VERSION}_linux_${GOARCH}.tar.gz -O ~/rpmbuild/SOURCES/frp_${VERSION}_linux_${GOARCH}.tar.gz
# Copy service files to SOURCES
cp frpc@.service ~/rpmbuild/SOURCES/
cp frps@.service ~/rpmbuild/SOURCES/
@@ -86,7 +86,7 @@ jobs:
--define "_release 1" \
--target ${{ matrix.arch }} \
frp.spec
# Rename artifacts to include version if not already obvious, but rpmbuild naming is standard.
# Standard: name-ver-rel.dist.arch.rpm
# We'll just list them to be sure
@@ -105,7 +105,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
@@ -118,10 +118,10 @@ jobs:
uses: softprops/action-gh-release@v1
with:
tag_name: v${{ needs.check_version.outputs.version }}
name: FRP v${{ needs.check_version.outputs.version }}
name: v${{ needs.check_version.outputs.version }}
body: |
Auto RPM build for frp v${{ needs.check_version.outputs.version }}
Universal RPM packages for x86_64 and aarch64.
files: |
artifacts/**/*.rpm
@@ -135,7 +135,7 @@ jobs:
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
@@ -146,43 +146,43 @@ jobs:
mkdir -p repo
# Artifacts are named frp-rpm-{arch}
# We want structure: repo/{arch}/
for dir in artifacts/*; do
dirname=$(basename "$dir")
# Extract arch from frp-rpm-<arch>
# dirname format: frp-rpm-<arch>
arch=$(echo $dirname | sed -E 's/frp-rpm-//')
mkdir -p repo/$arch
cp $dir/*.rpm repo/$arch/
done
# Generate frp.repo
echo "[frp]
# Generate go-frp.repo
echo "[go-frp]
name=FRP Packages for Fedora - \$basearch
baseurl=https://awfufu.github.io/frp-pkgs/\$basearch/
enabled=1
gpgcheck=0" > repo/frp.repo
gpgcheck=0" > repo/go-frp.repo
# Generate index.html
echo "<html><body><h1>FRP RPM Repository</h1><p>Use the following command to configure this repository:</p><pre>sudo dnf config-manager addrepo --from-repofile=https://awfufu.github.io/frp-pkgs/frp.repo</pre><p>For older DNF versions:</p><pre>sudo dnf config-manager --add-repo https://awfufu.github.io/frp-pkgs/frp.repo</pre></body></html>" > repo/index.html
echo "<html><body><h1>FRP RPM Repository</h1><p>Use the following command to configure this repository:</p><pre>sudo dnf config-manager addrepo --from-repofile=https://awfufu.github.io/frp-pkgs/go-frp.repo</pre><p>For older DNF versions:</p><pre>sudo dnf config-manager --add-repo https://awfufu.github.io/frp-pkgs/go-frp.repo</pre></body></html>" > repo/index.html
- name: Generate Repodata
run: |
sudo apt-get update
sudo apt-get install -y createrepo-c
for dir in repo/*; do
if [ -d "$dir" ]; then
echo "Processing $dir..."
# Calculate Base URL for this version's release artifacts
# GitHub Release structure: https://github.com/<owner>/<repo>/releases/download/<tag>/<filename>
# We assume the RPM filename in the repo matches the one in the release.
BASE_URL="https://github.com/${{ github.repository }}/releases/download/v${{ needs.check_version.outputs.version }}/"
createrepo_c --baseurl "$BASE_URL" "$dir"
# Remove RPM files so they are not committed to gh-pages
rm "$dir"/*.rpm
fi

View File

@@ -14,10 +14,10 @@ Auto RPM build for [frp](https://github.com/fatedier/frp) (Fast Reverse Proxy),
Add the repository to your system to receive automatic updates.
```bash
sudo dnf config-manager addrepo --from-repofile=https://awfufu.github.io/frp-pkgs/frp.repo
sudo dnf config-manager addrepo --from-repofile=https://awfufu.github.io/frp-pkgs/go-frp.repo
# For older DNF versions:
sudo dnf config-manager --add-repo https://awfufu.github.io/frp-pkgs/frp.repo
# sudo dnf config-manager --add-repo https://awfufu.github.io/frp-pkgs/go-frp.repo
sudo dnf install frpc frps
```