From 51365a4407a4433da9188fb9784e608f22c38f28 Mon Sep 17 00:00:00 2001 From: jemand771 Date: Sun, 22 Aug 2021 00:46:58 +0200 Subject: [PATCH] fix env variable problem turns out the workflow-wide `env` context doesn't work in job-level if conditions (it does however in step-level if conditions, which seems odd) --- .github/workflows/build.yml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 0c7cc5f6..efa2910c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -475,11 +475,23 @@ jobs: # TODO everything from here on is stable/unstable release only -# TODO i got lazy here + # all other release jobs should be based on this + release-precondition-check: + if: | + github.event_name == 'push' + && (github.ref == 'refs/heads/stable' + || github.ref == 'refs/heads/unstable') + needs: [build, test-postman-sqlite, test-postman-mysql, test-postman-postgres] + runs-on: ubuntu-latest + steps: + - name: dummy operation + - run: | + : + + # TODO i got lazy here docker-release: - if: ${{ env.is_release }} - needs: [build, test-postman-sqlite, test-postman-mysql, test-postman-postgres] + needs: release-precondition-check runs-on: ubuntu-latest steps: