From ea014e1b0cdeed2d4475c1a0c0ae7bea9d3134f7 Mon Sep 17 00:00:00 2001 From: fkwp Date: Wed, 10 Apr 2024 14:47:48 +0000 Subject: [PATCH] workaround env not available in job.if --- .github/workflows/docker-pr.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docker-pr.yaml b/.github/workflows/docker-pr.yaml index 309faee5..0f04609b 100644 --- a/.github/workflows/docker-pr.yaml +++ b/.github/workflows/docker-pr.yaml @@ -10,11 +10,14 @@ on: env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository }} - DO_DOCKER_BUILD: ${{ contains(github.event.pull_request.labels.*.name, 'docker build') }} + # due to https://github.com/actions/runner/issues/2372 + # and not wanting to workaround like https://stackoverflow.com/questions/73797254/environment-variables-in-github-actions/74217028#74217028 + # we disable for now a gloabl env variable since env is not available in job.if + # DO_DOCKER_BUILD: ${{ contains(github.event.pull_request.labels.*.name, 'docker build') }} jobs: build_element_call: - if: ${{ env.DO_DOCKER_BUILD }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'docker build') }} uses: ./.github/workflows/build_resuable.yaml secrets: SENTRY_ORG: ${{ secrets.SENTRY_ORG }} @@ -23,7 +26,7 @@ jobs: SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} build_docker: - if: ${{ env.DO_DOCKER_BUILD }} + if: ${{ contains(github.event.pull_request.labels.*.name, 'docker build') }} needs: build_element_call runs-on: ubuntu-latest permissions: