From ee2d977d943eb6776c8f2cf0415d3394b0c64cb0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Storsj=C3=B6?= Date: Sat, 3 Feb 2024 10:17:48 +0200 Subject: [PATCH] WIP: github: Modify actions; don't run the main build, force running the docker build on push --- .github/workflows/build.yml | 4 ---- .github/workflows/docker.yml | 41 ++++++------------------------------ 2 files changed, 7 insertions(+), 38 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 9ba12fd6..9f7f7136 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,9 +1,5 @@ name: Builds on: - push: - branches: - - '**' - pull_request: schedule: - cron: '0 0 * * *' diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index eb838468..4e046d30 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -1,5 +1,6 @@ name: Build docker images on: + push: workflow_dispatch: inputs: commit: @@ -18,40 +19,17 @@ on: default: false jobs: - prepare: - runs-on: ubuntu-latest - outputs: - TAG: ${{steps.get-parameters.outputs.TAG}} - steps: - - name: Download build parameters - uses: dawidd6/action-download-artifact@v3 - with: - workflow: build.yml - workflow_conclusion: success - commit: ${{inputs.commit}} - branch: ${{inputs.branch}} - event: push - name: parameters - - name: Get build parameters - id: get-parameters - run: | - cat parameters.txt >> $GITHUB_OUTPUT - cat $GITHUB_OUTPUT - docker-build-toolchain: - needs: [prepare] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - ref: ${{ (inputs.commit != '' && inputs.commit) || inputs.branch }} - name: Download toolchain uses: dawidd6/action-download-artifact@v3 with: workflow: build.yml workflow_conclusion: success - commit: ${{inputs.commit}} - branch: ${{inputs.branch}} + commit: + branch: master event: push name: linux-ucrt-.* name_is_regexp: true @@ -61,7 +39,7 @@ jobs: - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to Docker Hub - if: ${{inputs.login}} + if: false uses: docker/login-action@v2 with: username: ${{secrets.DOCKER_USERNAME}} @@ -71,24 +49,20 @@ jobs: with: context: . platforms: linux/amd64,linux/arm64 - push: ${{inputs.push}} + push: false file: ./Dockerfile.toolchain tags: | mstorsjo/llvm-mingw:latest - mstorsjo/llvm-mingw:${{needs.prepare.outputs.TAG}} - name: Inspect Docker images run: | docker images docker-build-dev: - needs: [prepare] runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - ref: ${{ (inputs.commit != '' && inputs.commit) || inputs.branch }} - name: Log in to Docker Hub - if: ${{inputs.login}} + if: false uses: docker/login-action@v3 with: username: ${{secrets.DOCKER_USERNAME}} @@ -97,11 +71,10 @@ jobs: uses: docker/build-push-action@v5 with: context: . - push: ${{inputs.push}} + 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