Job is being skipped regardless "if" condition. #2275
Answered
by
ChristopherHX
serious-angel
asked this question in
Q&A
-
Dear Developers, Thank you very much for the awesome project! ✨ Currently, I am trying to use Gitea Workflow test casename: 'Deployment Workflow'
on:
push:
branches:
- 'test'
- 'releases/**'
jobs:
environment-job:
name: 'Environment'
runs-on: 'ubuntu-latest'
outputs:
TEST: 'true'
steps:
- name: 'Environment Test'
run: date;
build-job:
name: 'Build'
runs-on: 'ubuntu-latest'
needs: 'environment-job'
if: ${{ needs.environment-job.outputs.TEST != 'true' }}
steps:
- name: 'Build Test'
id: 'build-test'
run: date;
deploy-job:
name: 'Deploy'
runs-on: 'ubuntu-latest'
needs: 'build-job'
if: |
always() &&
(needs.build-job.result == 'success' || needs.build-job.result == 'skipped')
steps:
- name: 'Deploy Test'
id: 'deploy-test'
run: date;
In the result, the both jobs get skipped: May I ask why does it not run job "Deploy" when job "Build" is marked "skipped"? Best and kind regards |
Beta Was this translation helpful? Give feedback.
Answered by
ChristopherHX
Apr 7, 2024
Replies: 1 comment 3 replies
-
Actually my own |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Case 1 should be fixed by https://github.com/nektos/act/pull/2276/files
Case 2 fix act_runner to do it like my github-act-runner (est 2021, has a longer livetime than act_runner)
https://github.com/ChristopherHX/github-act-runner/blob/87d16d54778b65a0fe69902a9c9071b96279104d/actionsdotnetactcompat/act_worker.go#L425-L457