Skip to content

test commit

test commit #12

Workflow file for this run

name: Container build
on:
pull_request:
push:
branches:
- "main"
workflow_dispatch:
env:
REGISTRY_IMAGE: quay.io/redlib/redlib
PLATFORMS: "linux/amd64,linux/arm64"
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
tags: |
type=sha
type=raw,value=latest,enable={{is_default_branch}}
-
name: Set up QEMU
uses: docker/setup-qemu-action@v3
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
-
name: Login to Quay.io Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: quay.io
username: ${{ secrets.QUAY_USERNAME }}
password: ${{ secrets.QUAY_ROBOT_TOKEN }}
-
name: Build and push
if: github.event_name != 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ env.PLATFORMS }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }}
file: Dockerfile
push: true
-
name: Build and push (Pull Request)
if: github.event_name == 'pull_request'
uses: docker/build-push-action@v5
with:
context: .
platforms: ${{ env.PLATFORMS }}
labels: ${{ steps.meta.outputs.labels }}
outputs: type=image,name=${{ env.REGISTRY_IMAGE }}
file: Dockerfile
push: false