Job is being skipped regardless "if" condition. #533

Open
opened 2024-04-06 06:52:18 +00:00 by artfaith · 0 comments

Dear Developers,

Thank you very much for the awesome project!

Currently, I am trying to use Gitea v1.21.10 for Action Workflows.


Workflow test case
name: '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:

image


May I ask why does it not run job "Deploy" when job "Build" is marked "skipped"?

Best and kind regards

Dear Developers, Thank you very much for the awesome project! ✨ Currently, I am trying to use [Gitea](https://gitea.com/gitea/act_runner) `v1.21.10` for Action Workflows. --- <details> <summary>Workflow test case</summary> ```yaml name: '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; ``` </details> --- In the result, the both jobs get skipped: ![image](/attachments/cef4bc7b-801e-49f0-a013-fff7d369c99b) --- May I ask why does it not run job "Deploy" when job "Build" is marked "skipped"? Best and kind regards
Zettat123 added the
kind
bug
label 2024-04-07 02:33:41 +00:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: gitea/act_runner#533
No description provided.