From 13db505866f1a36dd313ded3c15c45ae917fef27 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 25 Nov 2019 12:50:00 -0800 Subject: [PATCH] GitHub Actions: build stage 2 of MXE image for correct branch When triggered by a push event, the checkout action checks out the correct branch. But without this change, the stage 2 action would always run on master. Signed-off-by: Dirk Hohndel --- .github/workflows/mxe-dockerimage-stage1.yml | 2 +- .github/workflows/mxe-dockerimage-stage2.yml | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/mxe-dockerimage-stage1.yml b/.github/workflows/mxe-dockerimage-stage1.yml index 8a874e0b7..160625f95 100644 --- a/.github/workflows/mxe-dockerimage-stage1.yml +++ b/.github/workflows/mxe-dockerimage-stage1.yml @@ -46,4 +46,4 @@ jobs: -H "Accept: application/vnd.github.everest-preview+json" \ -H "Content-Type: application/json" \ https://api.github.com/repos/subsurface-divelog/subsurface/dispatches \ - --data '{"event_type": "${{ env.VERSION }}" }' + --data '{"event_type": "${{ env.VERSION }}", "client_payload": { "target_branch": "${{ github.ref }}" } }' diff --git a/.github/workflows/mxe-dockerimage-stage2.yml b/.github/workflows/mxe-dockerimage-stage2.yml index 531982a70..315adea56 100644 --- a/.github/workflows/mxe-dockerimage-stage2.yml +++ b/.github/workflows/mxe-dockerimage-stage2.yml @@ -12,6 +12,8 @@ jobs: steps: - uses: actions/checkout@v1 + with: + ref: ${{ github.event.client_payload.target_branch }} # Grab the version from the event name that we were triggered by and add ".stage1" to find the docker image to start FROM # And create the NAME of the final docker image