-
-
Notifications
You must be signed in to change notification settings - Fork 5.9k
Description
Description
Hi,
I'm encountering an issue with Gitea Actions. When creating a workflow that references another local workflow (using jobs.<job-id>.uses
), the scheduler does not respect the runs-on policy specified in the referenced workflow.
My setup:
- I have two runners: ubuntu and ubuntu-vm (see image below).
- If I set the runs-on option in the referenced workflow to ubuntu-vm, the calling workflow still runs on an arbitrary runner instead of the specified one.
I also have notice : the act_runner is also using gitea/runner-images:ubuntu-latest
when it doesn't find the wanted image (eg. ubuntu-vm
on act-runner-1
)
Example Workflows:
workflow-call-1.yaml:
name: Called Workflow 1
on:
workflow_call:
workflow_dispatch:
jobs:
test-job:
runs-on: ubuntu-vm
name: Job of workflow-call 1
steps:
- name: Say Hello 1
- run: |
echo "Hello World !"
workflow-call-2.yaml:
name: Called Workflow 2
on:
workflow_call:
workflow_dispatch:
jobs:
test-job:
runs-on: ubuntu
name: Job of workflow-call 2
steps:
- name: Say Hello 2
- run: |
echo "Hello World !"
workflow-call-3.yaml:
name: Called Workflow 3
on:
workflow_call:
workflow_dispatch:
jobs:
test-job:
runs-on: ubuntu-vm
name: Job of workflow-call 3
steps:
- name: Say Hello 3
- run: |
echo "Hello World !"
workflow-main.yaml:
name: Main workflow
on:
workflow_dispatch:
jobs:
my-workflow-parallel-1:
name: My workflow 1
uses: ./.gitea/workflows/workflow-call-1.yaml
my-workflow-parallel-2:
name: My workflow 2
uses: ./.gitea/workflows/workflow-call-2.yaml
my-workflow-waiting:
name: My workflow 2
needs: my-workflow-parallel-2
uses: ./.gitea/workflows/workflow-call-3.yaml
Here, when I run workflow-call-1.yaml
, no problem the workflow run on the ubuntu-vm runner but when I run the workflow-main
, it run on gitea/runner-images:ubuntu-latest
and I also have this line in the action log (from webUI) :
'runs-on' key not defined in Main workflow/my-workflow-parallel-2
Expected behavior:
The referenced workflow should always run on the runner defined by its own runs-on policy.
Actual behavior:
The workflow runs on a random runner, ignoring the runs-on specification of the referenced workflow.
Gitea Version
1.24.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
Debian
How are you running Gitea?
Running gitea from systemd (binary)
Database
PostgreSQL