Update library #2197
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: Update library | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: true | |
| on: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| push: | |
| paths-ignore: | |
| - "src/**" | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| check-proposals: | |
| name: Check if library is up to date | |
| runs-on: ubuntu-latest | |
| env: | |
| FOUNDRY_PROFILE: ci | |
| permissions: | |
| pull-requests: write | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # pin@v3 | |
| with: | |
| submodules: recursive | |
| fetch-depth: 0 | |
| - name: Install Foundry | |
| uses: foundry-rs/foundry-toolchain@8789b3e21e6c11b2697f5eb56eddae542f746c10 # pin@v1 | |
| with: | |
| version: nightly | |
| - uses: aave-dao/github-workflows/.github/actions/setup-node@main | |
| - uses: aave-dao/action-rpc-env@main | |
| with: | |
| ALCHEMY_API_KEY: ${{ secrets.ALCHEMY_API_KEY }} | |
| - name: Generate library | |
| run: npm run generate:addresses | |
| - name: Update verified.json cache | |
| continue-on-error: true | |
| run: npx vitest run tests/verification.spec.ts | |
| env: | |
| ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} | |
| - uses: actions/create-github-app-token@v2 | |
| id: app-token | |
| with: | |
| app-id: ${{ secrets.UPDATE_BOT_APP_ID }} | |
| private-key: ${{ secrets.UPDATE_BOT_TOKEN }} | |
| - name: Create Pull Request | |
| id: pr | |
| uses: peter-evans/create-pull-request@a45d1fb447fcaf601166e405fd4f335cde1a8aa8 # pin@00897e0bc2ceba9f86c9b0fda8429107112e6fa5 | |
| with: | |
| token: ${{ steps.app-token.outputs.token }} | |
| author: Cache-bot <noreply@github.com> | |
| committer: Cache-bot <noreply@github.com> | |
| commit-message: "fix(cache): automated cache update - updated addresses" | |
| delete-branch: true | |
| title: "fix(cache): automated cache update - updated addresses" | |
| - name: Approve pr | |
| if: ${{ steps.pr.outputs.pull-request-number }} | |
| run: gh pr review --approve "${{ steps.pr.outputs.pull-request-number }}" | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Enable Pull Request Automerge | |
| if: ${{ steps.pr.outputs.pull-request-number }} | |
| run: gh pr merge --squash --auto "${{ steps.pr.outputs.pull-request-number }}" | |
| env: | |
| GH_TOKEN: ${{ steps.app-token.outputs.token }} |