From bcc7798b96394b3241fbfdebefea4fa44a9c2d0e Mon Sep 17 00:00:00 2001 From: Liora Milbaum Date: Mon, 4 Dec 2023 06:33:24 +0200 Subject: [PATCH] Use GHA workflow for quick feedback --- .github/workflows/build-and-push-image.yml | 66 ---------------------- .github/workflows/build-image.yml | 36 ++++++++++++ 2 files changed, 36 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/build-and-push-image.yml create mode 100644 .github/workflows/build-image.yml diff --git a/.github/workflows/build-and-push-image.yml b/.github/workflows/build-and-push-image.yml deleted file mode 100644 index c5673500..00000000 --- a/.github/workflows/build-and-push-image.yml +++ /dev/null @@ -1,66 +0,0 @@ -name: Build and Push Image - -on: - pull_request: - branches: - - main - paths-ignore: - - "docs/**" - - push: - branches: - - main - paths-ignore: - - "docs/**" - - workflow_dispatch: - -env: - REGISTRY: quay.io - QUAY_ORG: centos-bootc - -jobs: - build-and-push-image: - runs-on: ubuntu-latest - - container: - image: quay.io/centos-bootc/builder:latest - options: --privileged - - strategy: - matrix: - os: [fedora, centos] - include: - - os: fedora - version: eln - - os: centos - version: stream9 - - steps: - - name: Checkout repository - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - - name: Workaround git safe.directory - run: git config --global --add safe.directory '*' - - - name: Set SOURCE_DATE_EPOCH - run: echo SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) >> $GITHUB_ENV - - - name: Login to quay.io - run: | - echo "${{ secrets.QUAY_PASSWORD }}" | skopeo login -u "${{ secrets.QUAY_USER }}" \ - --password-stdin ${{ env.REGISTRY }} - if: ${{ github.event_name == 'push' }} - - - name: Build - run: | - rpm-ostree compose image --format=ociarchive \ - --initialize ${{ matrix.os }}-bootc.yaml dest.oci-archive - if: ${{ github.event_name == 'pull_request' }} - - - name: Build and Push - run: | - rpm-ostree compose image --initialize-mode if-not-exists \ - --format=registry ${{ matrix.os }}-bootc.yaml \ - ${{ env.REGISTRY }}/${{ env.QUAY_ORG }}/${{ matrix.os }}-bootc:${{ matrix.version }} - if: ${{ github.event_name == 'push' }} diff --git a/.github/workflows/build-image.yml b/.github/workflows/build-image.yml new file mode 100644 index 00000000..13b9623f --- /dev/null +++ b/.github/workflows/build-image.yml @@ -0,0 +1,36 @@ +name: Build Image + +on: + pull_request: + branches: + - main + paths-ignore: + - "docs/**" + + workflow_dispatch: + +jobs: + build-image: + runs-on: ubuntu-latest + + container: + image: quay.io/centos-bootc/builder:latest + options: --privileged + + strategy: + matrix: + os: [fedora, centos] + include: + - os: fedora + version: eln + - os: centos + version: stream9 + + steps: + - name: Checkout repository + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Build + run: | + rpm-ostree compose image --format=ociarchive \ + --initialize ${{ matrix.os }}-bootc.yaml dest.oci-archive