Skip to content

Commit

Permalink
WIP: github: Run the docker job on push too
Browse files Browse the repository at this point in the history
  • Loading branch information
mstorsjo committed Sep 6, 2023
1 parent 90806c6 commit 2db85de
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 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 @@ -24,6 +25,7 @@ jobs:
TAG: ${{steps.get-parameters.outputs.TAG}}
steps:
- name: Download artifacts
if: github.event_name == 'workflow_dispatch'
uses: dawidd6/action-download-artifact@v2
with:
workflow: build.yml
Expand All @@ -35,7 +37,11 @@ jobs:
- name: Fetch build variables
id: get-parameters
run: |
cat parameters.txt >> $GITHUB_OUTPUT
if [ -f parameters.txt ]; then
cat parameters.txt >> $GITHUB_OUTPUT
else
echo TAG=test >> $GITHUB_OUTPUT
fi
cat $GITHUB_OUTPUT
docker-build:
Expand All @@ -61,7 +67,7 @@ jobs:
uses: docker/build-push-action@v4
with:
context: .
push: ${{inputs.push}}
push: ${{ (github.event_name == 'workflow_dispatch' && inputs.push) || false }}
file: ./${{matrix.file}}
tags: |
mstorsjo/llvm-mingw:${{matrix.maintag}}
Expand Down

0 comments on commit 2db85de

Please sign in to comment.