2020-07-28 05:22:28 +00:00
|
|
|
name: Fixes and Consistency Updates
|
2020-04-17 02:27:40 +00:00
|
|
|
on:
|
|
|
|
push:
|
2020-08-07 09:29:42 +00:00
|
|
|
# This runs on fork branches too
|
|
|
|
branches: [ '*' ]
|
2020-08-08 21:01:45 +00:00
|
|
|
workflow_dispatch:
|
2020-04-17 02:27:40 +00:00
|
|
|
jobs:
|
2020-08-06 19:17:38 +00:00
|
|
|
fix:
|
2020-04-17 02:27:40 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2020-08-07 10:47:01 +00:00
|
|
|
- name: Checkout (trustwallet repo, secret token)
|
|
|
|
if: github.repository_owner == 'trustwallet'
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
|
|
|
|
ref: ${{ github.ref }}
|
|
|
|
- name: Checkout (fork repo, default token)
|
|
|
|
if: github.repository_owner != 'trustwallet'
|
|
|
|
uses: actions/checkout@v2
|
2020-07-30 04:59:24 +00:00
|
|
|
with:
|
2020-08-07 09:29:42 +00:00
|
|
|
token: ${{ secrets.GITHUB_TOKEN }}
|
2020-08-07 08:56:27 +00:00
|
|
|
ref: ${{ github.ref }}
|
2020-07-30 04:59:24 +00:00
|
|
|
- uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: 12
|
|
|
|
- name: Install Dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: Run fix script
|
|
|
|
run: npm run fix
|
2020-08-05 10:59:39 +00:00
|
|
|
- name: Show fix result (diff); run 'npm run fix' locally
|
2020-08-07 08:56:27 +00:00
|
|
|
run: |
|
|
|
|
git status
|
|
|
|
git diff
|
2020-08-06 19:17:38 +00:00
|
|
|
- name: Run check
|
|
|
|
run: npm run check
|
2020-07-30 04:59:24 +00:00
|
|
|
- name: Run test
|
|
|
|
run: npm t
|
2020-08-07 09:29:42 +00:00
|
|
|
- name: Commit changes
|
2020-08-07 12:09:49 +00:00
|
|
|
# disabled on forks, commit there causes no CI run
|
|
|
|
if: success() && (github.repository_owner == 'trustwallet')
|
2020-07-30 04:59:24 +00:00
|
|
|
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: Fixes and Consistency Updates
|