Remove persister bia-assign image (#310) #225
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Docker | |
on: | |
push: | |
branches: | |
- main | |
- master | |
# pull_request: ~ | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build-api: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: . | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4.1.0 | |
with: | |
fetch-depth: 0 | |
- name: Log in to the Container registry | |
uses: docker/login-action@v2.2.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Build image label | |
id: image-label | |
run: | | |
echo "version=$(make api.version)" >> $GITHUB_OUTPUT | |
echo "image_name=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]')-api" >> $GITHUB_OUTPUT | |
- name: Build and push Docker image (version tag) | |
uses: docker/build-push-action@v4.2.0 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
context: . | |
file: api/Dockerfile | |
push: true | |
tags: ghcr.io/${{ steps.image-label.outputs.image_name }}:${{ steps.image-label.outputs.version }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Build and push Docker image (latest tag) | |
if: steps.check-version.outputs.current-version | |
uses: docker/build-push-action@v4.2.0 | |
with: | |
platforms: linux/amd64,linux/arm64 | |
context: . | |
file: api/Dockerfile | |
push: true | |
tags: ghcr.io/${{ steps.image-label.outputs.image_name }}:latest | |
labels: ${{ steps.meta.outputs.labels }} |