feat(ci): automatically link published packages to repository in Gitea
This commit is contained in:
1 parent
57f49822bb
commit
2926e2dac8
1 file changed
+14
@@ -65,6 +65,20 @@ jobs:
|
|||||||
echo "Debian Registry HTTP status: $HTTP_CODE"
|
echo "Debian Registry HTTP status: $HTTP_CODE"
|
||||||
fi
|
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
|
- name: Attach Artifacts to Gitea Release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
Reference in new issue
Block a user