Skip to content

Commit 684ca0b

Browse files
authored
feat(ci): Use reusable workflow for sync contracts (#737)
Signed-off-by: Javier Rodriguez <[email protected]>
1 parent 0555350 commit 684ca0b

File tree

1 file changed

+5
-24
lines changed

1 file changed

+5
-24
lines changed

.github/workflows/sync_contracts.yml

Lines changed: 5 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -13,27 +13,8 @@ on:
1313
permissions: read-all
1414

1515
jobs:
16-
diff:
17-
name: Sync Chainloop Workflow contracts
18-
runs-on: ubuntu-latest
19-
env:
20-
CHAINLOOP_VERSION: 0.84.0
21-
CHAINLOOP_API_TOKEN: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SYNC_CONTRACTS }}
22-
steps:
23-
- name: Install Chainloop
24-
run: |
25-
curl -sfL https://raw.githubusercontent.com/chainloop-dev/chainloop/01ad13af08950b7bfbc83569bea207aeb4e1a285/docs/static/install.sh | bash -s -- --version v${{ env.CHAINLOOP_VERSION }}
26-
27-
- uses: actions/[email protected]
28-
with:
29-
fetch-depth: 0
30-
31-
- name: Update contracts .github/workflows/contracts on Chainloop
32-
run: |
33-
for file in $(ls .github/workflows/contracts); do
34-
if [[ $file = *.yml || $file = *.yaml ]]; then
35-
contract_name=$(basename $file | cut -d'.' -f1)
36-
echo "Updating contract $contract_name with .github/workflows/contracts/$file"
37-
chainloop wf contract update --name $contract_name --contract .github/workflows/contracts/$file
38-
fi
39-
done
16+
chainloop_contract_sync:
17+
name: Chainloop Contract Sync
18+
uses: chainloop-dev/labs/.github/workflows/chainloop_contract_sync.yml@888e09a2391d8b0a89758fa222a053e1f058012e
19+
secrets:
20+
api_token: ${{ secrets.CHAINLOOP_ROBOT_ACCOUNT_SYNC_CONTRACTS }}

0 commit comments

Comments
 (0)