Skip to content

Commit

Permalink
add github action that upload qe images when code merged in test folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lilyLuLiu committed Sep 25, 2024
1 parent ec4d2b9 commit 8c3965b
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/qe-image-dev.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Push qe images when code change of test folder
on:
push:
branches:
- "main"
paths:
- test/**
env:
IMAGE_REGISTRY: quay.io
jobs:
build:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
go:
- '1.22'
os: ['linux', 'windows', 'darwin']
arch: ['amd64', 'arm64']
exclude:
- arch: 'arm64'
os: 'windows'
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Log in to Quay.io
uses: redhat-actions/podman-login@v1
with:
username: ${{ secrets.QUAY_IO_USERNAME }}
password: ${{ secrets.QUAY_IO_PASSWORD }}
registry: ${{ env.IMAGE_REGISTRY }}
- name: create script of building and push images
run: |
cat <<EOF > build-qe-images.sh
!#/bin/bash
set -x
OS=${{matrix.os}} ARCH=${{matrix.arch}} CRC_INTEGRATION_IMG_VERSION=vNext make containerized_integration
podman push quay.io/crcont/crc-integration:vNext-${{matrix.os}}-${{matrix.arch}}
OS=${{matrix.os}} ARCH=${{matrix.arch}} CRC_E2E_IMG_VERSION=vNext make containerized_e2e
podman push quay.io/crcont/crc-e2e:vNext-${{matrix.os}}-${{matrix.arch}}
EOF
- name: run script to build and push images
run: |
chmod +x build-qe-images.sh
./build-qe-images.sh

0 comments on commit 8c3965b

Please sign in to comment.