-
Notifications
You must be signed in to change notification settings - Fork 20
83 lines (73 loc) · 2.5 KB
/
publish.yml
File metadata and controls
83 lines (73 loc) · 2.5 KB
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Publish
on:
push:
branches: ['master']
paths: ['output/**']
# Ensures that only one deploy task per branch/environment will run at a time.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
update-dim:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout - D2AI
uses: actions/checkout@v6
with:
path: 'd2ai'
fetch-depth: 0
persist-credentials: false
- name: Checkout - DIM
uses: actions/checkout@v6
with:
repository: DestinyItemManager/DIM
path: 'DIM'
fetch-depth: 0
persist-credentials: false
- name: Update DIM with new info from D2AI
working-directory: DIM
run: find src/data/d2/* -delete && cp -f ../d2ai/output/* ./src/data/d2/
- name: Create Pull Request (DIM)
uses: peter-evans/create-pull-request@v8
with:
path: 'DIM'
token: ${{ secrets.PAT }}
commit-message: D2AI Build Update
committer: D2AI Bot <destinyitemmanager@gmail.com>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
title: '[D2AI] Build Update'
body: |
Build Update
- Update All - D2AI Changed
- Auto-generated by [D2AI][1]
[1]: https://github.com/DestinyItemManager/d2-additional-info
labels: d2ai, automated pr, no changelog
branch: d2ai-build
update-d2ai-module:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout - D2AI
uses: actions/checkout@v6
with:
path: 'd2ai'
fetch-depth: 0
persist-credentials: false
- name: Checkout - D2AI-module
uses: actions/checkout@v6
with:
repository: DestinyItemManager/d2ai-module
path: 'd2ai-module'
fetch-depth: 0
persist-credentials: false
- name: Update D2AI-module with new info from D2AI
run: cp -f d2ai/output/* d2ai-module/ && cp d2ai/CHANGELOG.md d2ai-module/
- name: Commit and push to d2ai-module
working-directory: d2ai-module
run: |
git config --local user.email "destinyitemmanager@gmail.com"
git config --local user.name "D2AI Bot"
git add .
git commit -m "D2AI Build Update"
git push https://x-access-token:${{ secrets.PAT }}@github.com/DestinyItemManager/d2ai-module.git HEAD:master