diff --git a/.github/workflows/33-reusable-workflow.yml b/.github/workflows/33-reusable-workflow.yml index c5e249c6e6..d311642ade 100644 --- a/.github/workflows/33-reusable-workflow.yml +++ b/.github/workflows/33-reusable-workflow.yml @@ -33,7 +33,7 @@ jobs: - name: Local Action Call Without Input id: local-action uses: ./.github/actions/local-action - # with: - # name: "World" - # - name: Local Action Output - # run: echo "${{ steps.local-action.outputs.random }}" + with: + name: "World" + - name: Local Action Output + run: echo "${{ steps.local-action.outputs.random }}" diff --git a/.github/workflows/workflow-tester37.yml b/.github/workflows/workflow-tester37.yml new file mode 100644 index 0000000000..f2feb1725f --- /dev/null +++ b/.github/workflows/workflow-tester37.yml @@ -0,0 +1,27 @@ +name: Test 37 #Related to https://stackoverflow.com/questions/72551501/using-if-statements-in-actions + +on: + workflow_dispatch: + inputs: + username: + required: true + type: string + +jobs: + test: + name: Pass input and secrets to my-action + runs-on: ubuntu-latest + steps: + - name: Inputs username (workflow call) + if: ${{ inputs.username }} != '' + run: echo ${{ inputs.username }} + + - name: Inputs username (workflow dispatch) + if: ${{ github.event.inputs.username }} != '' + run: echo ${{ github.event.inputs.username }} + + - uses: actions/checkout@v2.3.4 # Necessary to access local action + + - name: Local Action Call Without Input + id: local-action + uses: ./.github/actions/local-action