1
0
Fork 0
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:
Earl Warren 2025-08-10 18:17:25 +02:00
parent f1a8f17827
commit cbc2ec91d2
No known key found for this signature in database
GPG key ID: 0579CB2928A78A00
2 changed files with 5 additions and 5 deletions

View file

@ -22,9 +22,9 @@ jobs:
reusable_workflow_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://data.forgejo.org/actions/checkout@v4
- name: Run a one-line script
run: echo "✅ 🚀 ✅ hello this is from workflow reuse. Value - " ${{ inputs.my-val }} ${{ github.event_name }} ${{ inputs.dispatch-val }}
- name: Assert
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' }}

View file

@ -12,10 +12,10 @@ jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: https://data.forgejo.org/actions/checkout@v4
- 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:
uses: ./.github/workflows/local-reusable-and-dispatch.yml
uses: ./testdata/.github/workflows/local-reusable-and-dispatch.yml
with:
my-val: "passed value from main"