refactor: rewrite with plain commands #2
No reviewers
Labels
No labels
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
actions/secretsmanager!2
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "refactor/bash"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Contains some fixes and improvements:
Why not just use the vault CLI?
512M unzipped :D
@ -0,0 +1,5 @@{why do we check in ide files?
Using prettier to auto-format and enforce consistent formatting for workflow files and the README. Others who use this repo would automatically be prompted to get the corresponding extension. This is also why npm is part of this repo. Contains prettier as a dev dependency, nothing more. It's just there for DX :)
@ -50,1 +43,4 @@VAULT_PASSWORD: ${{ inputs.vault_password }}shell: shrun: |if [ -z "${VAULT_TOKEN_FILE}" ]; theni think we should use "set -e" and probably also "set -o pipefail" here
Agree
pipefail is not supported in runner environments but -e is present now
@ -51,0 +57,4 @@CURRENT_TOKEN="$(cat "${VAULT_TOKEN_FILE}")"if [ -n "${CURRENT_TOKEN}" ]; thenHTTP_CODE="$(curl -s -o /dev/null -w "%{http_code}" \should we use the --fail option as well?
Yes
Checked it again and no, we can't have --fail here. This endpoint can return a 403 if the Vault token expired, in which case the workflow will re-issue a new token. Docs are not clear which status codes can be returned. But I'm already checking for a 200 in the source code. Added a check for 4xx and 5xx status codes and causing the workflow to exit if the status code is not 403.
@ -0,0 +1,5 @@{do we really need npm here?
See comment on IDE files