Update .gitea/workflows/ci-test.yaml

This commit is contained in:
2025-09-07 21:29:58 +00:00
parent 2155c97a3c
commit cc06ed6c09

View File

@ -37,12 +37,12 @@ jobs:
with: with:
path: infra/iac path: infra/iac
#- name: cloning iac secrets repository - name: cloning iac secrets repository
# uses: actions/checkout@v4 uses: actions/checkout@v4
# with: with:
# repository: fenix-gitea-admin/iac-opentofu-private-secrets repository: fenix-gitea-admin/iac-opentofu-private-secrets
# token: ${{ secrets.GGITEA_TOKEN }} token: ${{ secrets.GGITEA_TOKEN }}
# path: infra/secrets path: infra/secrets
- name: Install cloudflare prerequisites - name: Install cloudflare prerequisites
@ -126,26 +126,26 @@ jobs:
BW_SESSION=$(bw login) BW_SESSION=$(bw login)
- name: vaultwarden getsecrets #- name: vaultwarden getsecrets
working-directory: infra/iac # working-directory: infra/iac
run: | # run: |
BW_SESSION2=$(bw unlock --raw --session "$BW_SESSION") # BW_SESSION2=$(bw unlock --raw --session "$BW_SESSION")
# Ler o arquivo de referência # # Ler o arquivo de referência
for secret in $(jq -c '.secrets[]' secrets/vault-secrets-map.json); do # for secret in $(jq -c '.secrets[]' secrets/vault-secrets-map.json); do
name=$(echo "$secret" | jq -r '.name') # name=$(echo "$secret" | jq -r '.name')
type=$(echo "$secret" | jq -r '.type') # type=$(echo "$secret" | jq -r '.type')
output=$(echo "$secret" | jq -r '.output') # output=$(echo "$secret" | jq -r '.output')
echo "$name $type $output" # echo "$name $type $output"
item_id=$(bw get item "$name" --session "$BW_SESSION2" | jq -r '.id') # item_id=$(bw get item "$name" --session "$BW_SESSION2" | jq -r '.id')
echo "$item_id" # echo "$item_id"
if [ "$type" == "attachment" ]; then # if [ "$type" == "attachment" ]; then
echo "attachment get" # echo "attachment get"
bw get attachment "$output" --itemid "$item_id" --output "$output" # bw get attachment "$output" --itemid "$item_id" --output "$output"
elif [ "$type" == "note" ]; then # elif [ "$type" == "note" ]; then
echo "note get" # echo "note get"
bw get item "$name" | jq -r '.notes' > "$output" # bw get item "$name" | jq -r '.notes' > "$output"
fi # fi
done # done
- name: Set up Python - name: Set up Python
uses: actions/setup-python@v4 uses: actions/setup-python@v4