Skip to content

syntax

syntax #298

Workflow file for this run

name: konductor
on:
workflow_dispatch:
push:
branches:
- main
paths-ignore:
- '.devcontainer/**'
- '.devcontainer.json'
- 'devcontainer.json'
- 'docs/**'
- '**.md'
pull_request:
branches:
- main
paths-ignore:
- '.devcontainer/**'
- '.devcontainer.json'
- 'devcontainer.json'
- 'docs/**'
- '**.md'
schedule:
- cron: '0 0 * * *'
env:
IMAGE: ghcr.io/containercraft/konductor
REGISTRY: ghcr.io
IMAGE_NAME: konductor
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
actions: write
steps:
-
name: Git Checkout
uses: actions/checkout@v4
id: git
with:
clean: ''
submodules: 'recursive'
ref: ${{ github.event.client_payload.sha }}
-
name: Setup QEMU
uses: docker/setup-qemu-action@v3
id: qemu
-
name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
id: buildx
-
name: Registry Login
uses: docker/login-action@v3
id: docker-login
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ github.token }}
-
name: Container Build
uses: docker/build-push-action@v5
id: container-build
with:
push: false
load: true
cache-to: ${{ github.repository_owner }}/${{ github.repository }}:latest
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest,ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ github.sha }}"
-
name: Container Push
uses: docker/build-push-action@v5
id: container-push
with:
push: true
cache-from: ${{ github.repository_owner }}/${{ github.repository }}:latest
context: .
file: Dockerfile
platforms: linux/amd64,linux/arm64
tags: "ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:latest,ghcr.io/${{ github.repository_owner }}/${{ github.repository }}:${{ github.sha }}"
if: github.event_name == 'push' && github.ref == 'refs/heads/main'