|
55 | 55 | images: ghcr.io/geocompx/${{ matrix.image }} |
56 | 56 | tags: | |
57 | 57 | type=sha,enable=${{ github.event_name == 'push' }} |
58 | | - type=raw,value=latest,enable=${{ matrix.image == 'latest' }} |
| 58 | + type=raw,value=latest,enable=${{ github.event_name == 'push' || github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' }} |
59 | 59 | type=raw,value={{date 'YYYY-MM-DD'}},enable=${{ github.event_name == 'schedule' }} |
60 | 60 |
|
61 | 61 | - name: Set up QEMU |
|
64 | 64 | - name: Set up Docker Buildx |
65 | 65 | uses: docker/setup-buildx-action@v3 |
66 | 66 |
|
67 | | - - name: Prepare tags |
68 | | - id: prepare-tags |
69 | | - if: ${{ matrix.image == 'latest' }} |
70 | | - run: | |
71 | | - # Combine metadata-action tags and add the explicit latest tag on its own line |
72 | | - META='${{ steps.meta.outputs.tags }}' |
73 | | - printf "%s\nghcr.io/geocompx/latest\n" "$META" > all-tags.txt |
74 | | - echo "tags<<EOF" >> $GITHUB_OUTPUT |
75 | | - cat all-tags.txt >> $GITHUB_OUTPUT |
76 | | - echo "EOF" >> $GITHUB_OUTPUT |
| 67 | + # ... no Prepare tags step; metadata-action will emit latest when appropriate |
77 | 68 |
|
78 | 69 | - name: Login to GitHub Container Registry |
79 | 70 | if: github.event_name == 'schedule' || github.event_name == 'push' |
|
90 | 81 | context: . |
91 | 82 | file: ${{ matrix.dockerfile }} |
92 | 83 | push: true |
93 | | - tags: ${{ steps.prepare-tags.outputs.tags && steps.prepare-tags.outputs.tags || steps.meta.outputs.tags }} |
| 84 | + tags: ${{ steps.meta.outputs.tags }} |
94 | 85 | labels: ${{ steps.meta.outputs.labels }} |
95 | 86 | secrets: | |
96 | 87 | "GITHUB_PAT=${{ secrets.GITHUB_TOKEN }}" |
|
0 commit comments