forked from keiyoushi/keiyoushi.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.47 KB
/
merge_keiyoushi.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
name: Merge keiyoushi
on:
schedule:
- cron: "0 0 */7 * *"
workflow_dispatch: # Manual dispatch
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
auto-merge:
name: Merge keiyoushi
if: github.repository == 'komikku-app/komikku-app.github.io'
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.BOT_PAT }}
- name: Import GPG key
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v4
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: GPG user IDs
run: |
echo "fingerprint: ${{ steps.import-gpg.outputs.fingerprint }}"
echo "keyid: ${{ steps.import-gpg.outputs.keyid }}"
echo "name: ${{ steps.import-gpg.outputs.name }}"
echo "email: ${{ steps.import-gpg.outputs.email }}"
- name: Merging
run: |
git remote add keiyoushi https://github.com/keiyoushi/keiyoushi.github.io
git fetch keiyoushi
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git config --global user.name "github-actions[bot]"
git merge -S --no-edit keiyoushi/main
- name: Push to repo
run: |
git push