We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f2894eb commit 1c29d00Copy full SHA for 1c29d00
1 file changed
.github/workflows/docker.yaml
@@ -25,7 +25,7 @@ jobs:
25
- name: Checkout repository
26
uses: actions/checkout@v4
27
with:
28
- ref: ${{ inputs.commit || 'main' }}
+ ref: ${{ github.ref || inputs.commit || 'main' }}
29
30
- name: Log in to Docker Hub
31
uses: docker/login-action@v3
@@ -57,6 +57,10 @@ jobs:
57
uses: docker/metadata-action@v5
58
59
images: ${{ steps.image-names.outputs.images }}
60
+ # Don't set latest label if it is a prerelease.
61
+ tags: |
62
+ type=raw,value=${{ github.ref_name }}
63
+ ${{ github.event_name == 'release' && github.event.release.prerelease != true && 'type=raw,value=latest' || '' }}
64
65
- name: Build and push Docker image
66
uses: docker/build-push-action@v5
0 commit comments