Skip to content

Add Github workflow for updating Github Actions. #4

Add Github workflow for updating Github Actions.

Add Github workflow for updating Github Actions. #4

---
name: Update GitHub Actions
on:
schedule:
- cron: 0 3 * * 0
push:
jobs:
update_github_actions:
name: Update GitHub Actions
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: bugfix
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version-file: .version-python
- name: Setup git
uses: fregante/setup-git-user@v2
- name: Generate token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.TOKEN_APP_ID }}
private-key: ${{ secrets.TOKEN_APP_SECRET }}
- name: Submit pull request
id: pull-request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: '[Bot] Update GitHub Actions.'
branch: update-github-actions
title: Update GitHub Actions
labels: bot
body: Update the versions of outdated GitHub Actions.
- name: Enable auto-merge
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
run: gh pr merge --merge --auto "${{ steps.pull-request.outputs.pull-request-number }}"