File tree 2 files changed +7
-10
lines changed
2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ runs:
22
22
23
23
- shell : bash
24
24
run : |
25
- sudo curl -Lo /usr/local/bin/vcn https://github.com/vchain-us/vcn/releases/download/v0.9.6/vcn-v0.9.6-linux-amd64-static
26
- sudo chmod a+x /usr/local/bin/vcn
25
+ mkdir -p "${{ github.action_path }}/bin"
26
+ curl -Lo "${{ github.action_path }}/bin/vcn" https://github.com/vchain-us/vcn/releases/download/v0.9.6/vcn-v0.9.6-linux-amd64-static
27
+ chmod a+x "${{ github.action_path }}/bin/vcn"
28
+ echo "${{ github.action_path }}/bin" >> $GITHUB_PATH
27
29
28
- state="$(vcn authenticate --org home-assistant.io --output json docker://ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }} | jq '.verification.status // 2')"
29
- if [[ "${state}" != "0" ]]; then
30
+ if ! "${{ github.action_path }}/bin/vcn" authenticate --org home-assistant.io --silent docker://ghcr.io/home-assistant/amd64-builder:${{ steps.version.outputs.version }}; then
30
31
echo "Invalid signature!"
31
32
exit 1
32
33
fi
Original file line number Diff line number Diff line change @@ -693,7 +693,6 @@ function codenotary_setup() {
693
693
function codenotary_sign() {
694
694
local trust=$1
695
695
local image=$2
696
- local state=
697
696
local vcn_cli=()
698
697
699
698
if bashio::var.false " ${DOCKER_PUSH} " || bashio::var.false " ${VCN_NOTARY} " ; then
@@ -706,8 +705,7 @@ function codenotary_sign() {
706
705
vcn_cli+=(" --org" " ${trust} " )
707
706
fi
708
707
709
- state=" $( vcn authenticate " ${vcn_cli[@]} " --output json " docker://${image} " | jq ' .verification.status // 2' ) "
710
- if [[ " ${state} " != " 0" ]]; then
708
+ if ! vcn authenticate " ${vcn_cli[@]} " --silent " docker://${image} " ; then
711
709
VCN_NOTARIZATION_PASSWORD=" ${CODENOTARY_PASSWORD} " vcn notarize --public " docker://${image} " || bashio::exit.nok " Failed to sign the image"
712
710
fi
713
711
bashio::log.info " Signed ${image} with ${trust} "
@@ -717,7 +715,6 @@ function codenotary_validate() {
717
715
local trust=$1
718
716
local image=$2
719
717
local pull=$3
720
- local state=
721
718
local vcn_cli=()
722
719
723
720
if ! bashio::var.has_value " ${trust} " ; then
@@ -735,8 +732,7 @@ function codenotary_validate() {
735
732
vcn_cli+=(" --org" " ${trust} " )
736
733
fi
737
734
738
- state=" $( vcn authenticate " ${vcn_cli[@]} " --output json " docker://${image} " | jq ' .verification.status // 2' ) "
739
- if [[ " ${state} " != " 0" ]]; then
735
+ if ! vcn authenticate " ${vcn_cli[@]} " --silent " docker://${image} " ; then
740
736
bashio::log.warning " Validation of ${image} fails!"
741
737
return 1
742
738
fi
You can’t perform that action at this time.
0 commit comments