toolkit/.github/workflows/imagefactory-image.yml

48 lines
1.3 KiB
YAML
Raw Normal View History

2022-07-04 18:44:17 +00:00
---
2022-07-05 01:18:39 +00:00
name: Build empanada images for imagefactory
2022-07-04 18:44:17 +00:00
on:
push:
branches: [ $default-branch, "devel" ]
pull_request:
branches: [ $default-branch ]
workflow_dispatch:
jobs:
buildx:
runs-on:
- ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
# https://github.com/docker/setup-buildx-action
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v1
with:
install: true
- name: Login to ghcr
if: github.event_name != 'pull_request'
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
id: docker_build
uses: docker/build-push-action@v2
with:
builder: ${{ steps.buildx.outputs.name }}
platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le
context: ./iso/empanadas
2022-07-04 18:47:26 +00:00
file: ./iso/empanadas/Containerfile.imagefactory
2022-07-04 18:44:17 +00:00
push: ${{ github.event_name != 'pull_request' }}
2022-07-04 18:47:26 +00:00
tags: ghcr.io/rocky-linux/empanadas-imagefactory:latest
2022-07-04 18:44:17 +00:00
cache-from: type=gha
cache-to: type=gha,mode=max