Bump Dependencies #12
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: Bump Dependencies | |
on: | |
# 手動觸發,可做用於任一 branch | |
workflow_dispatch: | |
# 排程觸發,只做用於 default branch | |
schedule: | |
- cron: "0 0 * * SUN" # In UTC time, 格式請參考: https://crontab.guru/ | |
jobs: | |
dep-update: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
java-version: '11' | |
distribution: 'temurin' | |
cache: 'maven' | |
- name: Bump dependencies | |
run: make bump-deps | |
- run: echo '```' > /tmp/diff.md && git diff >> /tmp/diff.md && echo '```' >> /tmp/diff.md | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: "chore(deps): bump dependencies" | |
title: "chore(deps): bump dependencies" | |
committer: bot <bot-noreply@softleader.com.tw> | |
author: bot <bot-noreply@softleader.com.tw> | |
body-path: /tmp/diff.md | |
labels: "dependencies-update" | |
branch: "bump-deps/${{ github.ref_name }}" | |
delete-branch: true | |
- name: Enable Auto-merge | |
if: steps.cpr.outputs.pull-request-operation == 'created' | |
run: gh pr merge --squash --auto "${{ steps.cpr.outputs.pull-request-number }}" | |
env: | |
GH_TOKEN: ${{ github.token }} | |
keepalive: | |
runs-on: ubuntu-latest | |
permissions: | |
actions: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: gautamkrishnar/keepalive-workflow@v2 |