From 961a5c4292f90e3d553b01b8c30601e4acf22d51 Mon Sep 17 00:00:00 2001 From: Jon Jensen Date: Fri, 18 Apr 2025 12:49:42 -0600 Subject: [PATCH] test secret handling/output --- .github/workflows/pull-request.yml | 1 + .github/workflows/test.yml | 9 ++++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml index 3f8020b..acffd03 100644 --- a/.github/workflows/pull-request.yml +++ b/.github/workflows/pull-request.yml @@ -5,3 +5,4 @@ concurrency: jobs: test: uses: ./.github/workflows/test.yml + secrets: inherit diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 35cf97f..4f0c46b 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,12 +8,19 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Mask a fake "secret" + run: echo "::add-mask::this is a fake secret" - name: Dynamic Use uses: ./../dynamic-uses id: setup_node with: uses: "${{ 'actions/setup-node@v3' }}" - with: '{ "node-version": "${{ env.node_version }}" }' + with: | + { + "node-version": ${{ toJSON(env.node_version) }}, + "fakeSecret": "this is a fake secret", + "realSecret": ${{ toJSON(secrets.TEST_SECRET) }} + } - name: Validate outputs run: | expected="v${node_version}"