Skip to content

Commit

Permalink
Updated workflow.
Browse files Browse the repository at this point in the history
  • Loading branch information
linus-berg committed Sep 8, 2024
1 parent e2eb80a commit c0cdfea
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/build-and-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,16 @@ jobs:

# steps to perform in job
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Checkout code
uses: actions/checkout@v3

# setup Docker buld action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3

- name: Login to Github Packages
uses: docker/login-action@v2
Expand All @@ -36,14 +39,16 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build image and push to Docker Hub and GitHub Container Registry
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
# relative path to the place where source code with Dockerfile is located
platforms: linux/amd64,linux/arm64
context: .
file: ./Dockerfile
# Note: tags has to be all lower-case
tags: |
ghcr.io/linus-berg/apc/${{ matrix.services.name }}:latest
ghcr.io/linus-berg/apc/${{ matrix.services.name }}:${{ github.sha }}
# build on feature branches, push only on main branch
push: ${{ github.ref == 'refs/heads/master' }}

Expand Down

0 comments on commit c0cdfea

Please sign in to comment.