Skip to content

Commit 5344787

Browse files
authored
use apply in contract sync job (#41)
Signed-off-by: Sylwester Piskozub <[email protected]>
1 parent bce55ef commit 5344787

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

.github/workflows/chainloop_contract_sync.yml

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,10 @@ jobs:
3232
run: |
3333
for file in $(ls ${{ inputs.contract_root_folder }}); do
3434
if [[ $file = *.yml || $file = *.yaml ]]; then
35-
contract_name=$(basename $file | cut -d'.' -f1)
3635
contract_file="${{ inputs.contract_root_folder }}/$file"
3736
38-
echo "Checking if contract $contract_name exists..."
39-
if chainloop wf contract describe --name $contract_name >/dev/null 2>&1; then
40-
echo "Contract $contract_name exists, updating..."
41-
chainloop wf contract update --name $contract_name --contract $contract_file
42-
else
43-
echo "Contract $contract_name does not exist, creating..."
44-
chainloop wf contract create --name $contract_name --contract $contract_file
45-
fi
37+
echo "Applying contract from $contract_file..."
38+
chainloop wf contract apply --contract $contract_file
4639
fi
4740
done
4841

0 commit comments

Comments
 (0)