We were able to do this on gitlabci but not after we moved to github actions. We want certain jobs like *building docker images, deploying helm chart etc.,) to be skipped if a variable DEPLOY=false is set for the repository. We are using common reusable workflows across many repositories.
jobs:
dockerbuildpush:
runs-on: [self-hosted, Ubuntu-22.04]
if: env.BUILD != false
I have tried ${{ }} syntax for the same but it is not considered as a valid syntax. It seems I can do the same for actions but not for jobs or workflow. Workflow contains many jobs, jobs contain many actions. I can do env.WHATEVER in if: for actions but not for jobs or workflows?!