diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index b4628e36..babc6925 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -28,6 +28,7 @@ jobs: docker buildx build --no-cache \ --platform linux/${{ matrix.platform }} \ -t quay.io/krkn-chaos/krkn \ + -t quay.io/redhat-chaos/krkn \ containers/ \ --build-arg PR_NUMBER=${{ github.event.pull_request.number }} @@ -39,15 +40,7 @@ jobs: username: ${{ secrets.QUAY_USERNAME }} password: ${{ secrets.QUAY_PASSWORD }} - - name: Login to redhat-chaos quay - if: startsWith(github.ref, 'refs/tags') - uses: docker/login-action@v3 - with: - registry: quay.io - username: ${{ secrets.QUAY_USER_1 }} - password: ${{ secrets.QUAY_TOKEN_1 }} - - - name: Build and push arch-specific images + - name: Build and push krkn-chaos images if: startsWith(github.ref, 'refs/tags') run: | ./containers/compile_dockerfile.sh @@ -56,6 +49,24 @@ jobs: --platform linux/${{ matrix.platform }} \ -t quay.io/krkn-chaos/krkn:latest-${{ matrix.platform }} \ -t quay.io/krkn-chaos/krkn:${TAG}-${{ matrix.platform }} \ + containers/ \ + --build-arg TAG=${TAG} \ + --push + + - name: Login to redhat-chaos quay + if: startsWith(github.ref, 'refs/tags') + uses: docker/login-action@v3 + with: + registry: quay.io + username: ${{ secrets.QUAY_USER_1 }} + password: ${{ secrets.QUAY_TOKEN_1 }} + + - name: Push redhat-chaos images + if: startsWith(github.ref, 'refs/tags') + run: | + TAG=${GITHUB_REF#refs/tags/} + docker buildx build --no-cache \ + --platform linux/${{ matrix.platform }} \ -t quay.io/redhat-chaos/krkn:latest-${{ matrix.platform }} \ -t quay.io/redhat-chaos/krkn:${TAG}-${{ matrix.platform }} \ containers/ \