Merge fix and history build into one. (#5667)

Co-authored-by: Catenocrypt <catenocrypt@users.noreply.github.com>
This commit is contained in:
Adam R 2021-02-23 10:30:14 +01:00 committed by GitHub
parent ced64b1145
commit 943556a3a9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 12 additions and 37 deletions

View File

@ -1,7 +1,10 @@
name: Fixes
name: Fixes and History
# Runs on:
# - on master branch of trustwallet repo: fix, history update, checkin
# - on other branch of trustwallet repo: fix, checkin
# - on fork repos: fix-sanity only
on:
push:
# This runs on fork branches too
branches: [ '*' ]
workflow_dispatch:
jobs:
@ -14,6 +17,8 @@ jobs:
with:
token: ${{ secrets.COMMIT_TOKEN }}
ref: ${{ github.ref }}
# this is needed for history, needs to access prev commits
fetch-depth: 0
- name: Checkout (fork repo, default token)
if: github.repository_owner != 'trustwallet'
uses: actions/checkout@v2
@ -31,7 +36,10 @@ jobs:
- name: Run fix-sanity script (fork repo, sanity only)
if: github.repository_owner != 'trustwallet'
run: npm run fix-sanity
- name: Show fix result (diff); run 'npm run fix' locally
- name: Run history
if: github.repository_owner == 'trustwallet' && github.branch == 'master'
run: npm run history
- name: Show result (diff) (run 'npm run fix' locally)
run: |
git status
git diff
@ -45,4 +53,4 @@ jobs:
with:
commit_user_name: trust-wallet-merge-bot
commit_user_email: mergebot@trustwallet.com
commit_message: Fixes (sanity and consistency, auto)
commit_message: Fixes (sanity and consistency, auto), history

View File

@ -1,33 +0,0 @@
name: History update
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout (with secret token)
uses: actions/checkout@v2
with:
token: ${{ secrets.COMMIT_TOKEN }}
ref: ${{ github.ref }}
fetch-depth: 0
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Install Dependencies
run: npm ci
- name: Run history
run: npm run history
- name: Show history update result (diff)
run: |
git status
git diff
- name: Commit changes
if: success()
uses: stefanzweifel/git-auto-commit-action@v4.1.2
with:
commit_user_name: trust-wallet-merge-bot
commit_user_email: mergebot@trustwallet.com
commit_message: History update