Skip to content

Update opencommit.yml #58

Update opencommit.yml

Update opencommit.yml #58

name: Create and publish a Docker image to GHCR
on:
push: {}
workflow_dispatch: {}
env:
REGISTRY: ghcr.io
PLATFORMS: linux/amd64,linux/arm64,linux/arm/v7,linux/arm/v6,linux/386,linux/ppc64le,linux/s390x
BUILDX_NO_DEFAULT_ATTESTATIONS: 1
permissions:
contents: read
packages: write
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build and push Docker image (worker)
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: ${{ github.event.repository.name }}-worker
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
multiPlatform: true
platform: ${{ env.PLATFORMS }}
directory: worker
dockerfile: worker/Dockerfile
addLatest: ${{ github.ref_name == 'main' }}
- name: Build and push Docker image (nginx)
uses: mr-smithers-excellent/docker-build-push@v6
with:
image: ${{ github.event.repository.name }}-nginx
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
multiPlatform: true
platform: ${{ env.PLATFORMS }}
directory: nginx
dockerfile: nginx/Dockerfile
addLatest: ${{ github.ref_name == 'main' }}