Action:
- id: sets-a-secret
run: |
local_secret=$(doppler secrets get GAR_JSON_KEY --plain)
echo "::add-mask::$local_secret"
echo "::set-output name=my-secret::$local_secret"
env:
DOPPLER_TOKEN: ${{ secrets.DOPPLER_TOKEN }}
local_secret is equal to:
{
"type": "service_account",
"project_id": "contrawork"
}
In GitHub log only the first line of the value is hidden:
##[debug]/usr/bin/bash -e /var/actions-runner/_runners/1/_work/_temp/10dcce73-cb22-43d9-853d-6c9674f6895e.sh
::add-mask::***
"type": "service_account",
"project_id": "contrawork"
}
::set-output name=my-secret::***
##[debug]steps['sets-a-secret']['outputs']['my-secret']='***'
"type": "service_account",
"project_id": "contrawork"
}
##[debug]Finishing: Run local_secret=$(doppler secrets get GAR_JSON_KEY --plain)
What's the correct way to use add-mask to avoid exposing a multi-line value in the output?