Skip to content

Fix bad formatting in the docker compose file #5

Fix bad formatting in the docker compose file

Fix bad formatting in the docker compose file #5

name: Build and Push Docker Image
on:
push:
branches:
- main
paths:
- 'build/dockerfile'
- 'build/requirements.txt'
- 'build/docker-compose.yml'
- '.github/workflows/build-docker-image.yml'
jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set image name
run: echo "IMAGE=ghcr.io/${GITHUB_REPOSITORY,,}" >> $GITHUB_ENV
- name: Set Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.IMAGE }}
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push via Docker compose
uses: docker/bake-action@v5
with:
files: build/docker-compose.yml
targets: app
set: |
*.tags=${{ steps.meta.outputs.tags }}
*.labels=${{ steps.meta.outputs.labels }}
push: true