Skip to content

Commit

Permalink
mask secret
Browse files Browse the repository at this point in the history
  • Loading branch information
EarthlingDavey committed Jul 19, 2024
1 parent 6b9d194 commit 3bd57f1
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion .github/workflows/ips.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ jobs:
handle_allowed_ips:
name: "Handle Allowed IPs"
runs-on: ubuntu-latest
outputs:
ips: ${{ steps.parseIps.outputs.ips }}
steps:
- name: "Checkout"
# @see https://github.com/actions/checkout
Expand All @@ -25,4 +27,10 @@ jobs:
id: parseIps
uses: mikefarah/yq@master
with:
cmd: "yq 'explode(.) | {\"deprecating\": .deprecating_access_to_moj_intranet | flatten, \"allow\": .allow_access_to_moj_intranet | flatten }' -o json deploy/config/example-moj-ips.yaml"
cmd: |
IPS=$((yq 'explode(.) | {"deprecating": .deprecating_access_to_moj_intranet | flatten, "allow": .allow_access_to_moj_intranet | flatten }' -o json deploy/config/example-moj-ips.yaml))
echo "::add-mask::$IPS"
echo "ips=$IPS" >> "$GITHUB_OUTPUT"
# cmd: "IPS=$(yq 'explode(.) | {"deprecating": .deprecating_access_to_moj_intranet | flatten, "allow": .allow_access_to_moj_intranet | flatten }' -o json deploy/config/example-moj-ips.yaml)"
- name: Reuse a variable obtained in another step
run: echo ${{ steps.parseIps.outputs.result }}

0 comments on commit 3bd57f1

Please sign in to comment.