WIP: build-llvm: Bump to the current version from the 21.x release br… #116
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: Build docker images | |
| on: | |
| push: | |
| workflow_dispatch: | |
| inputs: | |
| ref: | |
| description: 'Ref to extract from' | |
| type: string | |
| default: 'master' | |
| login: | |
| description: 'Log in to Docker Hub' | |
| type: boolean | |
| default: true | |
| push: | |
| description: 'Push the built images' | |
| type: boolean | |
| default: false | |
| jobs: | |
| prepare: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| TAG: ${{steps.get-parameters.outputs.TAG}} | |
| steps: | |
| - name: Download build parameters | |
| if: github.event_name == 'workflow_dispatch' | |
| uses: dawidd6/action-download-artifact@v10 | |
| with: | |
| workflow: build.yml | |
| workflow_conclusion: success | |
| ref: ${{inputs.ref}} | |
| event: push | |
| name: parameters | |
| - name: Get build parameters | |
| id: get-parameters | |
| run: | | |
| if [ -f parameters.txt ]; then | |
| cat parameters.txt >> $GITHUB_OUTPUT | |
| else | |
| echo TAG=test >> $GITHUB_OUTPUT | |
| fi | |
| cat $GITHUB_OUTPUT | |
| docker-build-dev: | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{inputs.ref}} | |
| - name: Log in to Docker Hub | |
| if: ${{inputs.login}} | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{vars.DOCKER_USERNAME}} | |
| password: ${{secrets.DOCKER_PASSWORD}} | |
| - name: Build Docker images | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: ${{ inputs.push || false }} | |
| file: ./Dockerfile.dev | |
| tags: | | |
| mstorsjo/llvm-mingw:dev | |
| mstorsjo/llvm-mingw:dev-${{needs.prepare.outputs.TAG}} | |
| - name: Inspect Docker images | |
| run: | | |
| docker images | |
| docker-build: | |
| needs: [prepare] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| ref: ${{inputs.ref}} | |
| - name: Download toolchain | |
| uses: dawidd6/action-download-artifact@v10 | |
| with: | |
| workflow: build.yml | |
| workflow_conclusion: success | |
| ref: master | |
| event: schedule | |
| name: linux-ucrt-.* | |
| name_is_regexp: true | |
| path: toolchain | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Log in to Docker Hub | |
| if: ${{inputs.login}} | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{vars.DOCKER_USERNAME}} | |
| password: ${{secrets.DOCKER_PASSWORD}} | |
| - name: Build Docker images | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: ${{ (github.event_name == 'workflow_dispatch' && inputs.push) || false }} | |
| file: ./Dockerfile.toolchain | |
| tags: | | |
| mstorsjo/llvm-mingw:latest | |
| mstorsjo/llvm-mingw:${{needs.prepare.outputs.TAG}} |