name: Apollo Router Updater on: schedule: # Every 2 hours - cron: '0 */2 * * *' # Allows you to run this workflow manually from the Actions tab workflow_dispatch: {} jobs: update: runs-on: ubuntu-22.04 permissions: issues: write pull-requests: write contents: write steps: - name: checkout uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4 with: fetch-depth: 1 token: ${{ secrets.BOT_GITHUB_TOKEN }} - name: setup environment uses: ./.github/actions/setup with: codegen: false actor: apollo-router-updater - name: Install Rust uses: actions-rs/toolchain@16499b5e05bf2e26879000db0c1d13f7e13fa3af # v1 with: toolchain: '1.91.1' default: true override: true - name: Check for updates id: check run: | pnpm tsx ./scripts/apollo-router-action.ts - name: Run updates if: steps.check.outputs.update == 'true' run: cargo update -p apollo-router --precise ${{ steps.check.outputs.version }} - name: Create Pull Request if: steps.check.outputs.update == 'true' uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # v7 with: token: ${{ secrets.BOT_GITHUB_TOKEN }} commit-message: Update apollo-router to version ${{ steps.check.outputs.version }} branch: apollo-router-update-${{ steps.check.outputs.version }} delete-branch: true title: ${{ steps.check.outputs.title }} body: | Automatic update of apollo-router to version ${{ steps.check.outputs.version }}. assignees: kamilkisiela,dotansimha reviewers: kamilkisiela,dotansimha