Merge pull request #677 from DestinyItemManager/fix-memento-names #217
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push to Master | |
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: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout - D2AI | |
uses: actions/checkout@v4 | |
with: | |
path: 'd2ai' | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
submodules: recursive | |
- name: Checkout - DIM | |
uses: actions/checkout@v4 | |
with: | |
repository: DestinyItemManager/DIM | |
path: 'DIM' | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: Checkout - D2AI-module | |
uses: actions/checkout@v4 | |
with: | |
repository: DestinyItemManager/d2ai-module | |
path: 'd2ai-module' | |
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token | |
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo | |
- name: Update DIM with new info from D2AI | |
id: DIM | |
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@v7 | |
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 | |
- name: Update D2AI-module with new info from D2AI | |
run: cp -f d2ai/output/* d2ai-module/ && cp d2ai/CHANGELOG.md d2ai-module/ | |
- name: Commit files to d2ai-module | |
run: | | |
cd d2ai-module | |
git config --local user.email "destinyitemmanager@gmail.com" | |
git config --local user.name "D2AI Bot" | |
git add . | |
git commit -m "D2AI Build Update" -a | |
- name: Push changes to d2ai-module | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PAT }} | |
repository: 'DestinyItemManager/d2ai-module' | |
directory: 'd2ai-module' |