-
Notifications
You must be signed in to change notification settings - Fork 243
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gh-action: add workflow to build test images
- Loading branch information
Showing
1 changed file
with
65 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
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 e2e image | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
run: | | ||
CRC_E2E_IMG_VERSION=pr-${PR_NUMBER} make containerized_e2e | ||
- name: Archive e2e image | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
run: | | ||
podman save -o ${{ env.IMAGE_NAME_E2E }}.tar quay.io/crcont/${{ env.IMAGE_NAME_E2E}}:pr-${PR_NUMBER} | ||
- name: Upload e2e artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.IMAGE_NAME_E2E }}-pr${{ github.event.number }} | ||
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 integration image | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
run: | | ||
CRC_INTEGRATION_IMG_VERSION=pr-${PR_NUMBER} make containerized_integration | ||
- name: Archive integration image | ||
env: | ||
PR_NUMBER: ${{ github.event.number }} | ||
run: | | ||
podman save -o ${{ env.IMAGE_NAME_INTEGRATION }}.tar quay.io/crcont/${{ env.IMAGE_NAME_INTEGRATION }}:pr-${PR_NUMBER} | ||
- name: Upload integration artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ env.IMAGE_NAME_INTEGRATION }}-pr${{ github.event.number }} | ||
path: ${{ env.IMAGE_NAME_INTEGRATION }}.tar |