Skip to content

Commit

Permalink
update image builder workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
robatipoor committed Mar 15, 2024
1 parent cb95d07 commit 4682ea1
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/image-builder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ name: build docker image

on:
push:
branches: ["main"]
tags:
- 'v*'

env:
CARGO_TERM_COLOR: always
Expand All @@ -29,13 +30,21 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push
- name: Push the latest Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./api/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/pf-api:latest

- name: Push the Docker image with the release tag
uses: docker/build-push-action@v4
with:
context: .
file: ./api/Dockerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/pf-api:${{ github.ref_name}}

- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

0 comments on commit 4682ea1

Please sign in to comment.