arc.codes
arc.codes copied to clipboard
Hide env variables with a flag
I want to save the commit hash and date in an env variable when I deploy using Github Actions so that I can show it in my app. For that, I have this in my Github Action:
- name: 📅 Save Commit Date
run: |
arc env -e staging --add LATEST_COMMIT_DATE "$(git show -s --format=%ci "$GITHUB_SHA")"
arc env -e staging --add LATEST_COMMIT_SHA "$GITHUB_SHA"
env:
CI: true
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
The problem is, that whenever I add a new env variable with arc env, the console is logging the values of all my other values. That includes my secrets. I want to avoid the secrets being logged in GitHub Actions since that is not so safe.

I would love to have a flag like --quiet to avoid showing the secret values while adding a new variable.