From 83df4755d94e6c37acc6a1141313e7fda893b3f5 Mon Sep 17 00:00:00 2001 From: Jakub Sliacan Date: Wed, 29 Nov 2023 10:53:47 +0100 Subject: [PATCH] gh-action: add workflow to build test images --- .github/workflows/build-tests.yml | 53 +++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/build-tests.yml diff --git a/.github/workflows/build-tests.yml b/.github/workflows/build-tests.yml new file mode 100644 index 0000000000..3e52cf2f53 --- /dev/null +++ b/.github/workflows/build-tests.yml @@ -0,0 +1,53 @@ +name: Build test images +on: + push: + branches: + - "main" + pull_request: {} + +env: + IMAGE_NAME_E2E: crc-e2e + IMAGE_NAME_INTEGRATION: crc-integration + +jobs: + build-e2e: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Build and archive e2e image + # use github.sha as ID to correlate various workflows triggered by the same event + run: | + CRC_E2E_IMG_VERSION=id-${{ github.sha }} make containerized_e2e + podman save -o ${{ env.IMAGE_NAME_E2E }}.tar quay.io/crcont/${{ env.IMAGE_NAME_E2E}}:id-${{ github.sha }} + + - name: Upload e2e image + uses: actions/upload-artifact@v3 + with: + name: ${{ env.IMAGE_NAME_E2E }}-id${{ github.sha }} + path: ${{ env.IMAGE_NAME_E2E }}.tar + + build-integration: + runs-on: ubuntu-latest + strategy: + fail-fast: false + + steps: + - name: Check out repository code + uses: actions/checkout@v3 + + - name: Build and archive integration image + # use github.sha as ID to correlate various workflows triggered by the same event + run: | + CRC_INTEGRATION_IMG_VERSION=id-${{ github.sha }} make containerized_integration + podman save -o ${{ env.IMAGE_NAME_INTEGRATION }}.tar quay.io/crcont/${{ env.IMAGE_NAME_INTEGRATION }}:id-${{ github.sha }} + + - name: Upload integration image + uses: actions/upload-artifact@v3 + with: + name: ${{ env.IMAGE_NAME_INTEGRATION }}-id${{ github.sha }} + path: ${{ env.IMAGE_NAME_INTEGRATION }}.tar \ No newline at end of file