diff --git a/.gitea/lib/shared-action/action.yml b/.gitea/lib/shared-action/action.yml index 28439f7..b0096bf 100644 --- a/.gitea/lib/shared-action/action.yml +++ b/.gitea/lib/shared-action/action.yml @@ -5,6 +5,9 @@ inputs: param1: description: 'The first parameter' required: true + secret1: + description: 'Pass in your secret like this' + required: true outputs: output-one: description: 'The output' @@ -29,5 +32,6 @@ runs: run: | echo "Second step here" echo "Variable one is - ${{ vars.VARIABLE_ONE }}" - echo "Secret one is - ${{ secrets.SECRET_ONE }}" + echo "Secret one is (secrets do not inherit) - ${{ secrets.SECRET_ONE }}" + echo "Secret parameter is (secrets must be passed this way) - ${{ inputs.secret1 }}" shell: bash diff --git a/.gitea/workflows/test-job.yml b/.gitea/workflows/test-job.yml index 564bf34..9706c84 100644 --- a/.gitea/workflows/test-job.yml +++ b/.gitea/workflows/test-job.yml @@ -20,5 +20,6 @@ jobs: uses: ./.gitea/lib/shared-action with: param1: 'Param1 value set in top level' + secret1: ${{ secrets.SECRET_ONE }} - name: 'Output composite action response' run: echo "Composite action returned - ${{ steps.call-composite-action.outputs.output-one }}"