Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| fafda14fe9 | |||
| 4489e1e0e2 | |||
| 3ce6540a8f |
@@ -38,10 +38,7 @@ jobs:
|
||||
name: Build & Push Docker Image
|
||||
needs: lint
|
||||
if: github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/v')
|
||||
runs-on: gitea-runner-on-dsm
|
||||
permissions:
|
||||
packages: write
|
||||
contents: read
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
@@ -106,9 +103,8 @@ jobs:
|
||||
|
||||
# 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}' | \
|
||||
jq -n --arg old "$OLD_BODY" --arg img "${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${TAG_NAME}" \
|
||||
'{body: ($old + "\n\n## 🐳 Docker Image\n```bash\ndocker pull " + $img + "\n```")}' | \
|
||||
curl -s -X PATCH \
|
||||
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
|
||||
Reference in New Issue
Block a user