-
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
I have my jobs split across multiple workflow files for organization:
actionlint.yamlwith jobactionlintformat.yamlwith jobsflake8andmypytest.yamlwith jobsunit-testandintegration-test
I have created a third file required.yaml with following:
name: Required
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
required:
runs-on: ubuntu-latest
timeout-minutes: 10
if: always()
needs:
- actionlint
- flake8
- mypy
- unit-test
- integration-test
steps:
- uses: actions/checkout@v4
- uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}But the Required check gets skipped, while Actionlint fails with:
Error: .github/workflows/required.yaml:10:3: job "required" needs job "actionlint" which does not exist in this workflow [job-needs]
I understand this means the needs only works in the same workflow file, so how do I check others? Do I need to duplicate the required job in every file?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels