Skip to content

Commit

Permalink
ci: push images on master & add latest tag
Browse files Browse the repository at this point in the history
  • Loading branch information
matusf committed Oct 9, 2023
1 parent 5e62e3a commit c487471
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v3

- name: Build Docker image
- name: Build Docker image
uses: docker/build-push-action@v4
with:
context: .
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/publish-container-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ name: publish-container-images

on:
push:
branches: [master]
tags:
- "v*"

Expand Down Expand Up @@ -31,9 +32,14 @@ jobs:
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=ref,event=tag
type=ref,event=pr
type=sha,format=short,prefix=
type=raw,value=latest
- name: Build and push Docker image
if: "startsWith(github.ref, 'refs/tags/')"
if: "startsWith(github.ref, 'refs/tags/') || startsWith(github.ref, 'refs/heads/master')"
uses: docker/build-push-action@v4
with:
context: .
Expand Down

0 comments on commit c487471

Please sign in to comment.