|
| 1 | +name: CI Multi-Architecture Fusing |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_run: |
| 5 | + workflows: ["CI ARM64 Build and Push", "CI"] |
| 6 | + types: |
| 7 | + - completed |
| 8 | + branches: |
| 9 | + - "master" |
| 10 | + |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 14 | + cancel-in-progress: true |
| 15 | + |
| 16 | +jobs: |
| 17 | + multi-architecture-fusing: |
| 18 | + if: ${{ github.event.workflow_run.conclusion == 'success' }} |
| 19 | + timeout-minutes: 60 # intentionally long to allow for slow builds |
| 20 | + runs-on: ubuntu-latest |
| 21 | + strategy: |
| 22 | + matrix: |
| 23 | + os: [ubuntu-22.04] |
| 24 | + python: ["3.11"] |
| 25 | + env: |
| 26 | + # secrets can be set in settings/secrets on github |
| 27 | + DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} |
| 28 | + steps: |
| 29 | + - uses: actions/checkout@v4 |
| 30 | + - name: setup QEMU |
| 31 | + uses: docker/setup-qemu-action@v3 |
| 32 | + - name: setup docker buildx |
| 33 | + id: buildx |
| 34 | + uses: docker/setup-buildx-action@v3 |
| 35 | + with: |
| 36 | + driver: docker-container |
| 37 | + - name: expose github runtime for buildx |
| 38 | + uses: crazy-max/ghaction-github-runtime@v3 |
| 39 | + - name: show system environs |
| 40 | + run: ./ci/helpers/show_system_versions.bash |
| 41 | + - name: login to Dockerhub |
| 42 | + uses: docker/login-action@v2 |
| 43 | + with: |
| 44 | + username: ${{ secrets.DOCKER_USERNAME }} |
| 45 | + password: ${{ secrets.DOCKER_PASSWORD }} |
| 46 | + - name: Set deployment variables |
| 47 | + run: | |
| 48 | + if [ "${GITHUB_REF}" == "refs/heads/master" ]; then |
| 49 | + echo "TAG_PREFIX=master-github" >> $GITHUB_ENV |
| 50 | + elif [[ "${GITHUB_REF}" == refs/heads/hotfix_v* ]]; then |
| 51 | + echo "TAG_PREFIX=hotfix-github" >> $GITHUB_ENV |
| 52 | + elif [[ "${GITHUB_REF}" == refs/heads/hotfix_staging_* ]]; then |
| 53 | + echo "TAG_PREFIX=hotfix-staging-github" >> $GITHUB_ENV |
| 54 | + fi |
| 55 | + - name: fuse images in the registry for latest tag |
| 56 | + run: | |
| 57 | + export DOCKER_IMAGE_TAG="$TAG_PREFIX-latest" |
| 58 | + make docker-image-fuse SUFFIX=arm64 |
0 commit comments