Skip to content

Merge pull request #200 from pneumaticapp/backend/workflow/45866__ski… #47

Merge pull request #200 from pneumaticapp/backend/workflow/45866__ski…

Merge pull request #200 from pneumaticapp/backend/workflow/45866__ski… #47

name: Build and push a new backend latest version
on:
push:
paths:
- 'backend/**'
branches:
- 'master'
jobs:
push_to_registry:
name: Push Docker image to Docker Hub
runs-on: ubuntu-latest
strategy:
matrix:
include:
- image: pneumaticworkflow/pneumatic-backend
dockerfile: backend/Dockerfile
- image: pneumaticworkflow/pneumatic-celery
dockerfile: backend/Dockerfile
- image: pneumaticworkflow/pneumatic-celery-beat
dockerfile: backend/Dockerfile
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v5
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PAT }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: cloud
endpoint: "pneumaticworkflow/pneumatic-release-builder"
- name: Build and push ${{ matrix.image }}
uses: docker/build-push-action@v6
with:
platforms: linux/amd64,linux/arm64
context: backend
file: ${{ matrix.dockerfile }}
push: true
tags: "${{ matrix.image }}:latest"
labels: ${{ steps.meta.outputs.labels }}