Skip to content

Update IDL

Update IDL #6165

Workflow file for this run

name: Update IDL
on:
schedule:
# every hour
- cron: '0 * * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
program: [
circuit_breaker,
data_credits,
fanout,
helium_entity_manager,
helium_sub_daos,
hexboosting,
lazy_distributor,
lazy_transactions,
mobile_entity_manager,
price_oracle,
rewards_oracle,
treasury_management,
voter_stake_registry
]
max-parallel: 1
steps:
- uses: actions/checkout@v4
# the script replaces the json file with a newly downloaded one
# and updates the version in Cargo.toml
- name: Update IDLs
id: update-idls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
TAG=$(.github/scripts/idl-update.sh ${{ matrix.program }})
if [ $? -ne 0 ]; then
echo "Failed to update IDLs: ${TAG}"
exit 1
fi
echo "${TAG}"
echo "TAG=${TAG}" >> "$GITHUB_ENV"
# creates a pull request with the updated idl
- name: Create Pull Request
uses: peter-evans/create-pull-request@v5
if: env.TAG != 'No updates found.'
with:
commit-message: "idl-update: ${{ env.TAG }}"
title: "idl-update: ${{ env.TAG }}"
branch: idl-update-${{ env.TAG }}