Compare commits
1 commit
5cabe9d3c6
...
353b3d68d5
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
353b3d68d5 |
1 changed files with 0 additions and 13 deletions
13
lib/vault.sh
13
lib/vault.sh
|
|
@ -158,19 +158,6 @@ before execution. See the TOML file for details."
|
|||
local file_path="vault/actions/${action_id}.toml"
|
||||
_vault_log "Writing ${file_path} to branch ${branch}"
|
||||
|
||||
# Get current file content if exists (for upload API)
|
||||
local current_content=""
|
||||
local file_exists
|
||||
file_exists=$(curl -sf -s -o /dev/null -w "%{http_code}" \
|
||||
-H "Authorization: token ${FORGE_TOKEN}" \
|
||||
"${ops_api}/contents/${file_path}?ref=${branch}" 2>/dev/null || echo "0")
|
||||
|
||||
if [ "$file_exists" = "200" ]; then
|
||||
current_content=$(curl -sf -H "Authorization: token ${FORGE_TOKEN}" \
|
||||
"${ops_api}/contents/${file_path}?ref=${branch}" 2>/dev/null | \
|
||||
jq -r '.content // empty')
|
||||
fi
|
||||
|
||||
# Encode TOML content as base64
|
||||
local encoded_content
|
||||
encoded_content=$(printf '%s' "$toml_content" | base64 -w 0)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue