Skip to content

Commit

Permalink
Add openssl verbosity and avoid piping find to xargs
Browse files Browse the repository at this point in the history
Signed-off-by: Kyle Harding <[email protected]>
  • Loading branch information
klutchell committed Sep 27, 2024
1 parent f1632ea commit da8a09b
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/yocto-build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,7 @@ jobs:
(inputs.sign-image == true || steps.balena-lib.outputs.is_private == 'true')
run: |
for artifact in ${{ env.DEPLOY_PATH }}/image/balena.img ${{ env.DEPLOY_PATH }}/balena-image.docker; do
openssl enc -e -aes-256-cbc -k '${{ secrets.PBDKF2_PASSPHRASE }}' -pbkdf2 -iter 310000 -md sha256 -salt -in "${artifact}" -out "${artifact}.enc"
openssl enc -v -e -aes-256-cbc -k '${{ secrets.PBDKF2_PASSPHRASE }}' -pbkdf2 -iter 310000 -md sha256 -salt -in "${artifact}" -out "${artifact}.enc"
done
echo "ENCRYPTED_EXTENSION=.enc" >>"${GITHUB_ENV}"
Expand Down Expand Up @@ -1135,10 +1135,9 @@ jobs:
- name: Decrypt artifacts
working-directory: ${{ env.WORKSPACE }}
run: |
# shellcheck disable=SC2038
find . -type f -name '*.enc' \
| xargs -I{} echo {} | sed 's/\.enc//g' \
| xargs -I{} openssl enc -d -aes-256-cbc -k '${{ secrets.PBDKF2_PASSPHRASE }}' -pbkdf2 -iter 310000 -md sha256 -salt -in {}.enc -out {}
for artifact in *.enc **/*.enc; do
openssl enc -v -d -aes-256-cbc -k '${{ secrets.PBDKF2_PASSPHRASE }}' -pbkdf2 -iter 310000 -md sha256 -salt -in "${artifact}" -out "${artifact/.enc/}"
done
- name: Install gzip
run: |
Expand Down

0 comments on commit da8a09b

Please sign in to comment.