feat: enable ARM/MultiArch support and update dependencies #2493
Workflow file for this run
This file contains hidden or 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
| name: Docker Image CI | |
| on: | |
| push: | |
| tags: ['v[0-9].[0-9]+.[0-9]+'] | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Build and Push to KrknChaos Quay | |
| if: startsWith(github.ref, 'refs/tags') | |
| run: | | |
| ./containers/compile_dockerfile.sh | |
| # Login to KrknChaos Quay | |
| echo "${{ secrets.QUAY_PASSWORD }}" | docker login quay.io -u "${{ secrets.QUAY_USERNAME }}" --password-stdin | |
| # Build and Push | |
| docker buildx build --platform linux/amd64,linux/arm64 \ | |
| --no-cache \ | |
| --output type=image,push=true \ | |
| -t quay.io/krkn-chaos/krkn:latest \ | |
| -t "quay.io/krkn-chaos/krkn:${GITHUB_REF#refs/tags/}" \ | |
| --build-arg "TAG=${GITHUB_REF#refs/tags/}" \ | |
| containers/ | |
| - name: Test Build the Docker images | |
| if: ${{ github.event_name == 'pull_request' }} | |
| run: | | |
| ./containers/compile_dockerfile.sh | |
| docker buildx build --platform linux/amd64,linux/arm64 \ | |
| --no-cache \ | |
| -t quay.io/krkn-chaos/krkn:test \ | |
| --build-arg PR_NUMBER=${{ github.event.pull_request.number }} \ | |
| containers/ | |
| - name: Push to RedHat Chaos Quay | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| run: | | |
| # Login to RedHat Chaos Quay | |
| echo "${{ secrets.QUAY_TOKEN_1 }}" | docker login quay.io -u "${{ secrets.QUAY_USER_1 }}" --password-stdin | |
| # Build and Push (will reuse cache) | |
| docker buildx build --platform linux/amd64,linux/arm64 \ | |
| --output type=image,push=true \ | |
| -t quay.io/redhat-chaos/krkn:latest \ | |
| -t "quay.io/redhat-chaos/krkn:${GITHUB_REF#refs/tags/}" \ | |
| --build-arg "TAG=${GITHUB_REF#refs/tags/}" \ | |
| containers/ | |
| - name: Rebuild krkn-hub | |
| if: startsWith(github.ref, 'refs/tags') | |
| uses: redhat-chaos/actions/krkn-hub@main | |
| with: | |
| QUAY_USER: ${{ secrets.QUAY_USERNAME }} | |
| QUAY_TOKEN: ${{ secrets.QUAY_PASSWORD }} | |
| AUTOPUSH: ${{ secrets.AUTOPUSH }} |