feat: enable unauthenticated server startup with runtime OAuth and update CI/CD to append Docker pull instructions to release notes
CI/CD Pipeline / Lint & Check (push) Successful in 54s
CI/CD Pipeline / Build & Push Docker Image (push) Failing after 11s

This commit is contained in:
2026-05-09 05:19:16 +02:00
parent a3305b162d
commit 6dd70c29aa
4 changed files with 48 additions and 2 deletions
+35 -1
View File
@@ -51,7 +51,7 @@ jobs:
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.MY_BUILDTOKEN }}
password: ${{ secrets.GITEA_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
@@ -88,3 +88,37 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache
cache-to: type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache,mode=max
- name: Update Gitea Release Notes
if: startsWith(github.ref, 'refs/tags/v')
run: |
TAG_NAME=${GITHUB_REF#refs/tags/}
# Fetch the current release
RELEASE_JSON=$(curl -s -H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
${{ github.api_url }}/repos/${{ github.repository }}/releases/tags/${TAG_NAME})
# Extract Release ID (if it exists)
RELEASE_ID=$(echo "$RELEASE_JSON" | jq -r '.id // empty')
if [ -n "$RELEASE_ID" ] && [ "$RELEASE_ID" != "null" ]; then
OLD_BODY=$(echo "$RELEASE_JSON" | jq -r '.body // ""')
# Check if Docker Image section already exists
if [[ "$OLD_BODY" != *"## 🐳 Docker Image"* ]]; then
NEW_BODY="${OLD_BODY}\n\n## 🐳 Docker Image\n\`\`\`bash\ndocker pull ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG_NAME}\n\`\`\`"
jq -n --arg body "$NEW_BODY" '{body: $body}' | \
curl -s -X PATCH \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/json" \
-d @- \
${{ github.api_url }}/repos/${{ github.repository }}/releases/${RELEASE_ID}
echo "Successfully updated Release Notes for $TAG_NAME"
else
echo "Release Notes already contain the Docker pull command."
fi
else
echo "No associated release found for tag $TAG_NAME. Skipping."
fi