Sync Chainloop Workflow contracts #767
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Sync Chainloop Workflow contracts | |
| on: | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - ".github/workflows/contracts/**" | |
| schedule: | |
| - cron: "0 0 * * *" # daily at midnight | |
| # Declare default permissions as read only. | |
| permissions: read-all | |
| jobs: | |
| chainloop_contract_sync: | |
| name: "Chainloop Contract Sync" | |
| runs-on: ubuntu-latest | |
| env: | |
| CHAINLOOP_TOKEN: ${{ secrets.CHAINLOOP_TOKEN }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| - name: Install Chainloop | |
| run: | | |
| curl -sfL https://dl.chainloop.dev/cli/install.sh | bash -s | |
| - name: Update contract definitions | |
| run: | | |
| for file in .github/workflows/contracts/*.yaml; do | |
| chainloop wf contract apply -f $file | |
| done |