2023-04-07 13:50:11 +00:00
|
|
|
---
|
|
|
|
name: Build images 2nd layer images
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ main ]
|
|
|
|
workflow_dispatch:
|
|
|
|
schedule:
|
|
|
|
- cron: "0 1 * * 0"
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
run_image_builds:
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
version:
|
|
|
|
- major: 8
|
|
|
|
arch: 'amd64, arm64'
|
|
|
|
- major: 9
|
2023-11-28 20:32:11 +00:00
|
|
|
arch: 'amd64, arm64, ppc64le, s390x'
|
2023-04-07 13:50:11 +00:00
|
|
|
type:
|
|
|
|
- micro
|
|
|
|
- init
|
|
|
|
registry:
|
|
|
|
- domain: docker.io
|
|
|
|
account: rockylinux
|
|
|
|
secret: DOCKER
|
|
|
|
- domain: quay.io
|
|
|
|
account: rockylinux
|
|
|
|
secret: QUAY
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Build and push images
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Install qemu dependency
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y qemu-user-static
|
|
|
|
|
|
|
|
- name: Setup Registry login
|
|
|
|
uses: redhat-actions/podman-login@v1
|
|
|
|
with:
|
|
|
|
username: ${{ secrets[format('{0}_USERNAME', matrix.registry.secret)] }}
|
|
|
|
password: ${{ secrets[format('{0}_TOKEN', matrix.registry.secret)] }}
|
|
|
|
registry: ${{ matrix.registry.domain }}
|
|
|
|
|
|
|
|
- name: Build image
|
|
|
|
uses: redhat-actions/buildah-build@v2
|
|
|
|
id: build-image
|
|
|
|
with:
|
|
|
|
archs: ${{ matrix.version.arch }}
|
|
|
|
build-args: |
|
|
|
|
ImageVersion=${{ matrix.version.major }}
|
|
|
|
containerfiles: |
|
|
|
|
./Containerfile-${{ matrix.type }}
|
|
|
|
labels: |
|
|
|
|
name=rockylinux
|
|
|
|
version=${{ matrix.version.major }}-ubi-${{ matrix.type }}
|
2023-05-06 23:00:25 +00:00
|
|
|
oci: true
|
2023-04-07 13:50:11 +00:00
|
|
|
tags: ${{ matrix.registry.domain }}/${{ matrix.registry.account }}/rockylinux:${{ matrix.version.major }}-ubi-${{ matrix.type }}
|
|
|
|
|
|
|
|
- name: Push image
|
|
|
|
uses: redhat-actions/push-to-registry@v2
|
|
|
|
with:
|
|
|
|
image: ${{ steps.build-image.outputs.image }}
|
|
|
|
tags: ${{ steps.build-image.outputs.tags }}
|
2023-05-06 23:00:25 +00:00
|
|
|
extra-args: |
|
|
|
|
--format=v2s2
|