Skip to content

fix: build backend workflow #31

fix: build backend workflow

fix: build backend workflow #31

---
name: Build docker image - backend application
on:
push:
branches:
- main
# trigger events for SemVer like tags
tags:
# match e.g. 1.1.1 and 1.1.1-rc1
- '[0-9]+.[0-9]+.[0-9]+'
- '[0-9]+.[0-9]+.[0-9]+-*'
pull_request:
branches:
- main
jobs:
build-docker-images-backend:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
# Needed to create multi-platfrom image
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Build and push
uses: docker/build-push-action@5cd11c3a4ced054e52742c5fd54dca954e0edd85 # v6.7.0
with:
context: ./edc-chat-app-backend
file: ./edc-chat-app-backend/Dockerfile
platforms: linux/amd64, linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}