Skip to content

Commit 774fbce

Browse files
committed
more workflow testing
1 parent fb2a384 commit 774fbce

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

.github/workflows/build-production-container.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,29 +20,38 @@ jobs:
2020
username: ${{ secrets.DOCKER_HUB_USER }}
2121
password: ${{ secrets.DOCKER_HUB_TOKEN }}
2222
- name: Build test image
23-
uses: docker/build-push-action@v2
23+
uses: docker/build-push-action@v5
2424
with:
25-
tags: metacpan/metacpan-api-v0-shim:test
25+
tags: ${{ github.repository }}:test
2626
target: test
2727
push: false
2828
- name: Run Perl tests
29-
run: docker run -i metacpan/metacpan-api-v0-shim:test
29+
run: docker run -i ${{ github.repository }}:test
3030
- name: Docker meta
3131
id: meta
3232
uses: docker/metadata-action@v5
3333
with:
34-
images: metacpan/metacpan-api-v0-shim
35-
flavour: |
34+
images: ${{ github.repository }}
35+
flavor: |
3636
latest=false
3737
tags: |
3838
type=sha
3939
type=ref,event=branch
4040
type=ref,event=pr
4141
type=raw,value=latest,enable={{is_default_branch}}
42-
- run: echo '${{ steps.meta.outputs.json }}'
42+
- name: Docker meta (sha)
43+
id: docker-sha-tag
44+
uses: docker/metadata-action@v5
45+
with:
46+
images: ${{ github.repository }}
47+
flavor: |
48+
latest=false
49+
tags: |
50+
type=sha
4351
- name: Build and push
4452
uses: docker/build-push-action@v5
4553
with:
4654
tags: ${{ steps.meta.outputs.tags }}
47-
labels: ${{ steps.meta.outputs.labels }}
4855
annotations: ${{ steps.meta.outputs.annotations }}
56+
- if: contains( fromJSON(steps.meta.outputs.json).tags, "${{ github.repository }}:latest")
57+
run: echo 'need update to ${{ steps.docker-sha-tag.outputs.tags }}'

0 commit comments

Comments
 (0)