Skip to content

Commit

Permalink
test
Browse files Browse the repository at this point in the history
Signed-off-by: Adrian Riobo Lorenzo <[email protected]>
  • Loading branch information
adrianriobo committed Jul 31, 2024
1 parent 154df0a commit 851c1e7
Showing 1 changed file with 39 additions and 14 deletions.
53 changes: 39 additions & 14 deletions .github/workflows/build-oci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ on:
branches: [ main ]

jobs:
snc-runner-oci:
name: snc-runner-oci
build-snc-runner-oci:
name: build-snc-runner-oci
runs-on: ubuntu-24.04
steps:
- name: Checkout code
Expand All @@ -19,25 +19,50 @@ jobs:
- name: Build image for PR
if: ${{ github.event_name == 'pull_request' }}
shell: bash
env:
SNC_RUNNER: ghcr.io/crc-org/ci-definitions
SNC_RUNNER_V: pr-${{ github.event.number }}
run: |
SNC_RUNNER=ghcr.io/crc-org/ci-definitions SNC_RUNNER_V=pr-${{ github.event.number }} make build-snc-runner-oci
make build-snc-runner-oci
podman save -o snc-runner.tar ${SNC_RUNNER}:${SNC_RUNNER_V}
- name: Upload image for PR
uses: actions/upload-artifact@v4
with:
name: snc-runner
path: snc-runner.tar

build-crc-builder-oci:
name: build-crc-builder-oci
runs-on: ubuntu-24.04
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout code
uses: actions/checkout@v4

- name: Prepare runner
shell: bash
run: |
sudo apt-get install -y qemu-user-static
- name: Prepare runner
shell: bash
run: |
sudo apt-get install -y qemu-user-static
- name: Build image for PR
if: ${{ github.event_name == 'pull_request' }}
shell: bash
run: |
CRC_BUILDER=ghcr.io/crc-org/ci-definitions CRC_BUILDER_V=pr-${{ github.event.number }} make build-crc-builder-oci
- name: Build images for PR
if: ${{ github.event_name == 'pull_request' }}
shell: bash
env:
CRC_BUILDER: ghcr.io/crc-org/ci-definitions
CRC_BUILDER_V: pr-${{ github.event.number }}
run: |
make build-crc-builder-oci
# crc-builder creates 3 images (1 per platform)
podman save -o crc-builder-linux.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-linux
podman save -o crc-builder-windows.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-windows
podman save -o crc-builder-darwin.tar ${CRC_BUILDER}:${CRC_BUILDER_V}-darwin
- name: Upload image for PR
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v4
with:
name: crc-builder
path: *.tar



0 comments on commit 851c1e7

Please sign in to comment.