feat(ci): automatically link published packages to repository in Gitea
Build and Publish Release / Build Packages and Publish (push) Successful in 15s
Build and Publish Release / Build Packages and Publish (push) Successful in 15s
This commit is contained in:
1 parent
57f49822bb
commit
8d4157b42d
1 file changed
+14
@@ -65,6 +65,20 @@ jobs:
|
||||
echo "Debian Registry HTTP status: $HTTP_CODE"
|
||||
fi
|
||||
|
||||
# Link packages to this repository in Gitea
|
||||
REPO_NAME=$(basename "${{ github.repository }}")
|
||||
echo "Linking RPM package 'linux-updater' to repository ${REPO_NAME}..."
|
||||
LINK_RPM=$(curl -k -s -w " (HTTP %{http_code})" -X POST \
|
||||
-H "Authorization: token ${PKG_TOKEN}" \
|
||||
"${{ github.server_url }}/api/v1/packages/${{ github.repository_owner }}/rpm/linux-updater/-/link/${REPO_NAME}")
|
||||
echo "RPM link result: $LINK_RPM"
|
||||
|
||||
echo "Linking Debian package 'linux-updater' to repository ${REPO_NAME}..."
|
||||
LINK_DEB=$(curl -k -s -w " (HTTP %{http_code})" -X POST \
|
||||
-H "Authorization: token ${PKG_TOKEN}" \
|
||||
"${{ github.server_url }}/api/v1/packages/${{ github.repository_owner }}/debian/linux-updater/-/link/${REPO_NAME}")
|
||||
echo "Debian link result: $LINK_DEB"
|
||||
|
||||
- name: Attach Artifacts to Gitea Release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
Reference in new issue
Block a user