Skip to content

Commit

Permalink
Add development branch, add container image tag main
Browse files Browse the repository at this point in the history
  • Loading branch information
sgfn committed Aug 8, 2023
1 parent 1ed3220 commit 23c256e
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/deploy-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Build and publish Docker image
on:
push:
branches:
- dev
- main
tags:
- "v*.*.*"
Expand All @@ -29,21 +30,27 @@ jobs:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
# Will publish image tagged `vX.Y.Z` on each release tag
# `latest` by default refers to image built on latest release
type=semver,pattern={{version}}
type=edge,branch=main
# Will publish image tagged `edge` on each push to `dev`
type=edge,branch=dev
# Will publish image tagged `main` on each push to `main`
type=ref,event=branch
- name: Build and push Docker image
uses: docker/build-push-action@v4
with:
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=gha
cache-to: type=gha,mode=max

0 comments on commit 23c256e

Please sign in to comment.