generated from Enveloppe/mkdocs-publisher-template
-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (49 loc) · 1.46 KB
/
auto_update.yml
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: Get lastest release from template
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get .env file
uses: xom9ikk/dotenv@v2
with:
path: .github/
load_mode: skip
- name: Get release from template
uses: robinraju/release-downloader@main
with:
latest: true
fileName: "release.zip"
repository: "ObsidianPublisher/follow_template"
- name: Unzip changed files
run: |
unzip -o release.zip
rm release.zip
- name: Create Pull Request
id: cpr
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: Update from template
title: "[BUMP] Update from template"
body: |
files changed:
```
$(git diff --name-only HEAD^ HEAD)
```
labels: |
update
branch: update_repo
delete-branch: true
- name: AutoMerging
if: ${{ steps.cpr.outputs.pull-request-operation == 'created' && env.AUTO_MERGE == 'true' }}
uses: peter-evans/enable-pull-request-automerge@main
with:
token: ${{ secrets.GH_TOKEN }}
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
merge-method: squash