Skip to content

tweak docker build

tweak docker build #91

Workflow file for this run

name: Docker Images CI
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
env:
PUSH_IMAGES: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
steps:
- uses: actions/checkout@v4
- name: Build the Docker images
run: docker compose build
- name: Log in to the Container registry
if: ${{ env.PUSH_IMAGES == 'true' }}
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Publish the Docker images
if: ${{ env.PUSH_IMAGES == 'true' }}
run: docker compose push