Skip to content

Commit

Permalink
WIP: github: Modify actions; don't run the main build, force running …
Browse files Browse the repository at this point in the history
…the docker build on push
  • Loading branch information
mstorsjo committed Feb 8, 2024
1 parent becddc3 commit ee2d977
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 38 deletions.
4 changes: 0 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
name: Builds
on:
push:
branches:
- '**'
pull_request:
schedule:
- cron: '0 0 * * *'

Expand Down
41 changes: 7 additions & 34 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Build docker images
on:
push:
workflow_dispatch:
inputs:
commit:
Expand All @@ -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
Expand All @@ -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}}
Expand All @@ -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}}
Expand All @@ -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

0 comments on commit ee2d977

Please sign in to comment.