Skip to content

Commit

Permalink
Try new line replace (#677)
Browse files Browse the repository at this point in the history
* Reduce max children + increase spare servers

* Output to Env

* Clean ips_formatted

* Add env

* Try new line replacement
  • Loading branch information
wilson1000 authored Aug 22, 2024
1 parent 30b21a0 commit 173920d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/ip-ranges-configure.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,8 @@ jobs:
ALLOW_FORMATTED=$(yq 'explode(.) | .allow_access_to_moj_intranet | flatten | map(. + " '$ALLOW_VALUE';") | join("\n")' moj-cidr-addresses.yml)
DEPRI_FORMATTED=$(yq 'explode(.) | .deprecating_access_to_moj_intranet | flatten | map(. + " '$DEPRI_VALUE';") | join("\n")' moj-cidr-addresses.yml)
echo "::add-mask::This is my value"
echo "::add-mask::$ALLOW_FORMATTED"
echo "::add-mask::$DEPRI_FORMATTED"
echo "::add-mask::$(echo "$ALLOW_FORMATTED" | sed ':a;N;$!ba;s/%/%25/g' | sed ':a;N;$!ba;s/\r/%0D/g' | sed ':a;N;$!ba;s/\n/%0A/g')"
echo "::add-mask::$(echo "$DEPRI_FORMATTED" | sed ':a;N;$!ba;s/%/%25/g' | sed ':a;N;$!ba;s/\r/%0D/g' | sed ':a;N;$!ba;s/\n/%0A/g')"
# Below is a line for LB_RANGE - trust these internal IPs to correctly report HTTP_X_FORWARDED_FOR.
# `127.0.0.1 $LOCAL_VALUE;` - allows requests from fpm to nginx containers.
Expand All @@ -53,4 +52,4 @@ jobs:
echo "$DEPRI_FORMATTED"
echo "${{ vars.CLOUD_RANGE }} $CLOUD_VALUE;"
echo EOF
} >> $GITHUB_ENV
} >> $GITHUB_OUPUT

0 comments on commit 173920d

Please sign in to comment.