daily #1118
This file contains 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: daily | |
on: | |
schedule: | |
- cron: '5 5 * * *' # 05:05 (UTC) | |
env: | |
UPDATE_DEPS_TITLE: 'build(deps): update dependencies' | |
jobs: | |
# https://github.com/peter-evans/create-pull-request/blob/main/docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens | |
update-deps: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: tibdex/github-app-token@v2 | |
id: generate-token | |
with: | |
app_id: ${{ secrets.CI_BOT_APP_ID }} | |
private_key: ${{ secrets.CI_BOT_PRIVATE_KEY }} | |
# Use `main` in order to use actions/github-script@v7 for avoiding a warning. | |
- uses: raven-actions/bot-details@main | |
id: bot-details | |
with: | |
bot-slug-name: mirakc-ci | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
# Fetch all history for all branches and tags | |
# so that ./scripts/update-deps works properly. | |
fetch-depth: 0 | |
- name: Update dependencies | |
id: update-deps | |
run: | | |
./scripts/update-deps /tmp/update-deps.log.md | |
echo "body=/tmp/update-deps.log.md" >>"$GITHUB_OUTPUT" | |
env: | |
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }} | |
- name: Create Pull Request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
token: ${{ steps.generate-token.outputs.token }} | |
title: ${{ env.UPDATE_DEPS_TITLE }} | |
body-path: ${{ steps.update-deps.outputs.body }} | |
commit-message: ${{ env.UPDATE_DEPS_TITLE }} | |
author: ${{ steps.bot-details.outputs.name-email }} | |
branch: update-deps | |
delete-branch: true | |
labels: dependencies |