1
0
mirror of https://github.com/mastodon/mastodon synced 2024-11-30 15:58:14 +09:00

Add tag with commit hash to PR image builds (#32418)

This commit is contained in:
Claire 2024-10-11 16:16:37 +02:00 committed by GitHub
parent 10ea6da09f
commit e15befebbd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -21,9 +21,11 @@ jobs:
uses: actions/checkout@v4 uses: actions/checkout@v4
- id: version_vars - id: version_vars
run: | run: |
echo mastodon_version_metadata=pr-${{ github.event.pull_request.number }}-$(git rev-parse --short HEAD) >> $GITHUB_OUTPUT echo mastodon_version_metadata=pr-${{ github.event.pull_request.number }}-$(git rev-parse --short ${{github.event.pull_request.head.sha}}) >> $GITHUB_OUTPUT
echo mastodon_short_sha=$(git rev-parse --short ${{github.event.pull_request.head.sha}}) >> $GITHUB_OUTPUT
outputs: outputs:
metadata: ${{ steps.version_vars.outputs.mastodon_version_metadata }} metadata: ${{ steps.version_vars.outputs.mastodon_version_metadata }}
short_sha: ${{ steps.version_vars.outputs.mastodon_short_sha }}
build-image: build-image:
needs: compute-suffix needs: compute-suffix
@ -39,6 +41,7 @@ jobs:
latest=auto latest=auto
tags: | tags: |
type=ref,event=pr type=ref,event=pr
type=ref,event=pr,suffix=-${{ needs.compute-suffix.outputs.short_sha }}
secrets: inherit secrets: inherit
build-image-streaming: build-image-streaming:
@ -55,4 +58,5 @@ jobs:
latest=auto latest=auto
tags: | tags: |
type=ref,event=pr type=ref,event=pr
type=ref,event=pr,suffix=-${{ needs.compute-suffix.outputs.short_sha }}
secrets: inherit secrets: inherit