From 62a27d0896181eea0ad8c59e1deaefceac606265 Mon Sep 17 00:00:00 2001 From: lilyLuLiu Date: Mon, 8 Jul 2024 11:40:16 +0800 Subject: [PATCH] add new action --- .github/workflows/qe-images.yml | 54 +++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/qe-images.yml diff --git a/.github/workflows/qe-images.yml b/.github/workflows/qe-images.yml new file mode 100644 index 0000000000..b317e4d4ec --- /dev/null +++ b/.github/workflows/qe-images.yml @@ -0,0 +1,54 @@ +name: Push qe images for new tag +on: + push: + tags: + - '*' +env: + IMAGE_REGISTRY: quay.io +jobs: + build: + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-latest + go: + - '1.21' + 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 < build-qe-images.sh + OS=linux ARCH=amd64 CRC_INTEGRATION_IMG_VERSION=${1} make containerized_integration + podman push quay.io/crcont/crc-integration:${1}-linux-amd64 + OS=windows ARCH=amd64 CRC_INTEGRATION_IMG_VERSION=${1} make containerized_integration + podman push quay.io/crcont/crc-integration:${1}-windows-amd64 + OS=darwin ARCH=amd64 CRC_INTEGRATION_IMG_VERSION=${1} make containerized_integration + podman push quay.io/crcont/crc-integration:${1}-darwin-amd64 + OS=darwin ARCH=arm64 CRC_INTEGRATION_IMG_VERSION=${1} make containerized_integration + podman push quay.io/crcont/crc-integration:${1}-darwin-arm64 + OS=linux ARCH=amd64 CRC_E2E_IMG_VERSION=${1} make containerized_e2e + podman push quay.io/crcont/crc-e2e:${1}-linux-amd64 + OS=windows ARCH=amd64 CRC_E2E_IMG_VERSION=${1} make containerized_e2e + podman push quay.io/crcont/crc-e2e:${1}-windows-amd64 + OS=darwin ARCH=amd64 CRC_E2E_IMG_VERSION=${1} make containerized_e2e + podman push quay.io/crcont/crc-e2e:${1}-darwin-amd64 + OS=darwin ARCH=arm64 CRC_E2E_IMG_VERSION=${1} make containerized_e2e + podman push quay.io/crcont/crc-e2e:${1}-darwin-arm64 + EOF + - name: run script to build and push images + env: + TAG_CONTEXT: ${{ toJson(github.ref_name) }} + run: | + echo $TAG_CONTEXT + chmod +x build-qe-images.sh + ./build-qe-images.sh $TAG_CONTEXT + shell: bash