mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2025-08-26 18:20:59 +00:00
fix: prevent unintended input replacement in reusable workflows with workflow_dispatch when using workflow_call (#2502) (followup)
This commit is contained in:
parent
f1a8f17827
commit
cbc2ec91d2
2 changed files with 5 additions and 5 deletions
|
@ -22,9 +22,9 @@ jobs:
|
||||||
reusable_workflow_job:
|
reusable_workflow_job:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||||
- name: Run a one-line script
|
- name: Run a one-line script
|
||||||
run: echo "✅ 🚀 ✅ hello this is from workflow reuse. Value - " ${{ inputs.my-val }} ${{ github.event_name }} ${{ inputs.dispatch-val }}
|
run: echo "✅ 🚀 ✅ hello this is from workflow reuse. Value - " ${{ inputs.my-val }} ${{ github.event_name }} ${{ inputs.dispatch-val }}
|
||||||
- name: Assert
|
- name: Assert
|
||||||
run: |
|
run: |
|
||||||
exit ${{ ( inputs.my-val == 'default_value_reuse_workflow_call' || inputs.my-val == 'passed value from main' ) && !inputs.dispatch-val && '0' || '1' }}
|
exit ${{ ( inputs.my-val == 'default_value_reuse_workflow_call' || inputs.my-val == 'passed value from main' ) && !inputs.dispatch-val && '0' || '1' }}
|
||||||
|
|
|
@ -12,10 +12,10 @@ jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: https://data.forgejo.org/actions/checkout@v4
|
||||||
- name: Run a one-line script
|
- name: Run a one-line script
|
||||||
run: echo "✅ 🚀 ✅ hello this is from workflow main" ${{ github.event_name }}
|
run: echo "✅ 🚀 ✅ hello this is from workflow main" ${{ github.event_name }}
|
||||||
call-reuse-w-val:
|
call-reuse-w-val:
|
||||||
uses: ./.github/workflows/local-reusable-and-dispatch.yml
|
uses: ./testdata/.github/workflows/local-reusable-and-dispatch.yml
|
||||||
with:
|
with:
|
||||||
my-val: "passed value from main"
|
my-val: "passed value from main"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue