-
Notifications
You must be signed in to change notification settings - Fork 12
45 lines (44 loc) · 1.47 KB
/
update_jp.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
name: Update JP
on:
workflow_dispatch: null
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Run Rust Action
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- uses: actions-rs/cargo@v1
with:
command: run
args: -- --region jp update all
- name: Extract Version
id: extract_version
run: echo "version=$(cat public/data/jp/version.txt)" >> $GITHUB_OUTPUT
- name: Create Commit
run: |
git add .
git config --global user.email "[email protected]"
git config --global user.name "Github Bot"
git commit -m "[JP] ${{ steps.extract_version.outputs.version }}"
- name: Push Changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: jp-${{ steps.extract_version.outputs.version }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "[JP] ${{ steps.extract_version.outputs.version }}"
title: "[JP] ${{ steps.extract_version.outputs.version }}"
body: "Automated PR"
branch: jp-${{ steps.extract_version.outputs.version }}
base: main
labels: jp
reviewers: "respectZ"
assignees: "respectZ"
draft: false