From 9536ab07438e4c69740838f27c5dffa748d06600 Mon Sep 17 00:00:00 2001 From: Neil Hanlon Date: Mon, 4 Jul 2022 14:44:17 -0400 Subject: [PATCH] Update CI for both image types for now --- .github/workflows/imagefactory-image.yml | 47 ++++++++++++++++++++++++ .github/workflows/mix-empanadas.yml | 4 +- 2 files changed, 49 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/imagefactory-image.yml diff --git a/.github/workflows/imagefactory-image.yml b/.github/workflows/imagefactory-image.yml new file mode 100644 index 0000000..8934bb9 --- /dev/null +++ b/.github/workflows/imagefactory-image.yml @@ -0,0 +1,47 @@ +--- +name: Build empanada container images + +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 + file: ./iso/empanadas/Containerfile.imagebuild + push: ${{ github.event_name != 'pull_request' }} + tags: ghcr.io/rocky-linux/empanadas-imagebuild:latest + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/.github/workflows/mix-empanadas.yml b/.github/workflows/mix-empanadas.yml index ebae78d..7ee3791 100644 --- a/.github/workflows/mix-empanadas.yml +++ b/.github/workflows/mix-empanadas.yml @@ -40,8 +40,8 @@ jobs: builder: ${{ steps.buildx.outputs.name }} platforms: linux/amd64,linux/arm64,linux/s390x,linux/ppc64le context: ./iso/empanadas - file: ./iso/empanadas/Containerfile + file: ./iso/empanadas/Containerfile.imagefactory push: ${{ github.event_name != 'pull_request' }} - tags: ghcr.io/rocky-linux/sig-core-toolkit:latest + tags: ghcr.io/rocky-linux/empanadas-imagefactory:latest cache-from: type=gha cache-to: type=gha,mode=max