Skip to content

Commit

Permalink
Added test-add-mask-secret (#62)
Browse files Browse the repository at this point in the history
  • Loading branch information
kyhau authored May 15, 2024
1 parent 37e2b6d commit f9e143c
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/test-add-mask-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: test-add-mask-secret
# run-name: "Env: ${{ inputs.env }} Secret Name: ${{ inputs.secret_name }} @ ${{ github.ref_name }}"

on:
workflow_dispatch:
inputs:
secret_name:
description: Secret Name
required: true
type: string
secret_value:
description: Secret Value
required: true
type: string

defaults:
run:
shell: bash

env:
SECRET_NAME: ${{ inputs.secret_name }}

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Mask
run: |
SECRET_VALUE=$(jq -r '.inputs.secret_value' $GITHUB_EVENT_PATH)
echo ::add-mask::$SECRET_VALUE
echo SECRET_VALUE=$SECRET_VALUE >> $GITHUB_ENV
- run: echo $SECRET_VALUE

0 comments on commit f9e143c

Please sign in to comment.