Skip to content

Commit

Permalink
test: value to be masked should not be hard-coded in the action
Browse files Browse the repository at this point in the history
Co-authored-by: Markus Wolf <markus.wolf@new-work.se>
  • Loading branch information
2 people authored and github-actions committed May 19, 2022
1 parent 3296615 commit c47d978
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/runner/runner_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ func TestMaskValues(t *testing.T) {
})

assertNoSecret(output, "secret value")
assertNoSecret(output, "composite secret")
assertNoSecret(output, "YWJjCg==")
}

func TestRunEventSecrets(t *testing.T) {
Expand Down
4 changes: 2 additions & 2 deletions pkg/runner/testdata/mask-values/composite/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ runs:
steps:
- run: echo "secret value"
shell: bash
- run: echo "::add-mask::composite secret"
- run: echo "::add-mask::$(echo "abc" | base64)"
shell: bash
- run: echo "composite secret"
- run: echo "abc" | base64
shell: bash
2 changes: 1 addition & 1 deletion pkg/runner/testdata/mask-values/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@ jobs:
- run: echo "::add-mask::secret value"
- run: echo "secret value"
- uses: ./mask-values/composite
- run: echo "composite secret"
- run: echo "YWJjCg=="

0 comments on commit c47d978

Please sign in to comment.