-
Notifications
You must be signed in to change notification settings - Fork 2
57 lines (54 loc) · 1.97 KB
/
update-nointro-database.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Update NoIntro Database
on:
workflow_dispatch: {}
schedule:
- cron: "44 4 1 */3 *"
jobs:
update-nointro-database:
name: Update NoIntro Database
runs-on: ubuntu-latest
env:
COMMIT_MESSAGE: ":arrow_up: Update NoIntro database"
steps:
- name: Generate Token
id: app-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.BOT_APP_ID }}
private-key: ${{ secrets.BOT_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
submodules: true
- name: Change Cache Key
run: echo '// ${{ github.job }}' >> go.sum
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Download database
run: go generate ./internal/database/...
- name: Create Pull Request
id: pr
uses: peter-evans/create-pull-request@v6
with:
token: ${{ steps.app-token.outputs.token }}
committer: GoNES Bot <159408161+gones-bot[bot]@users.noreply.github.com>
author: GoNES Bot <159408161+gones-bot[bot]@users.noreply.github.com>
add-paths: "*.csv"
commit-message: ${{ env.COMMIT_MESSAGE }}
branch: update-nointro-database
title: ${{ env.COMMIT_MESSAGE }}
body: |
This PR updates the NoIntro database.
Generated by the Update NoIntro Database Action.
View update log [here](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}).
labels: dependencies,nointro
- uses: peter-evans/enable-pull-request-automerge@v3
if: steps.pr.outputs.pull-request-operation == 'created'
with:
token: ${{ steps.app-token.outputs.token }}
pull-request-number: ${{ steps.pr.outputs.pull-request-number }}
merge-method: squash