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