2021-09-24 20:02:35 +00:00
|
|
|
name: Fixes
|
2021-02-23 09:30:14 +00:00
|
|
|
# Runs on:
|
2021-09-24 20:02:35 +00:00
|
|
|
# - on master branch of trustwallet repo: fix, checkin
|
2021-02-23 09:30:14 +00:00
|
|
|
# - on other branch of trustwallet repo: fix, checkin
|
|
|
|
# - on fork repos: fix-sanity only
|
2020-04-17 02:27:40 +00:00
|
|
|
on:
|
|
|
|
push:
|
2021-02-23 10:38:38 +00:00
|
|
|
branches:
|
|
|
|
- 'master'
|
|
|
|
- '*'
|
2020-08-08 21:01:45 +00:00
|
|
|
workflow_dispatch:
|
2020-04-17 02:27:40 +00:00
|
|
|
jobs:
|
2020-08-10 08:56:41 +00:00
|
|
|
fix-all:
|
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:
|
2020-11-01 06:01:39 +00:00
|
|
|
token: ${{ secrets.COMMIT_TOKEN }}
|
2020-08-07 10:47:01 +00:00
|
|
|
ref: ${{ github.ref }}
|
2021-12-15 21:38:32 +00:00
|
|
|
|
2020-08-07 10:47:01 +00:00
|
|
|
- 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 }}
|
2021-12-15 21:38:32 +00:00
|
|
|
|
2021-12-19 21:39:53 +00:00
|
|
|
- name: Set up Go
|
2021-12-15 21:38:32 +00:00
|
|
|
uses: actions/setup-go@v2
|
2020-07-30 04:59:24 +00:00
|
|
|
with:
|
2022-05-26 14:55:41 +00:00
|
|
|
go-version: 1.18
|
2021-12-15 21:38:32 +00:00
|
|
|
id: go
|
|
|
|
|
2022-01-14 14:02:39 +00:00
|
|
|
- name: Run fix
|
2020-08-10 08:56:41 +00:00
|
|
|
if: github.repository_owner == 'trustwallet'
|
2022-01-14 14:02:39 +00:00
|
|
|
run: make fix
|
2021-12-15 21:38:32 +00:00
|
|
|
|
|
|
|
- name: Show fix result (diff)
|
2020-08-07 08:56:27 +00:00
|
|
|
run: |
|
|
|
|
git status
|
|
|
|
git diff
|
2021-12-15 21:38:32 +00:00
|
|
|
|
2020-08-06 19:17:38 +00:00
|
|
|
- name: Run check
|
2022-01-14 14:02:39 +00:00
|
|
|
run: make check
|
2021-12-15 21:38:32 +00:00
|
|
|
|
2020-08-07 09:29:42 +00:00
|
|
|
- name: Commit changes
|
2020-08-12 13:31:48 +00:00
|
|
|
if: success()
|
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
|
2021-09-24 20:02:35 +00:00
|
|
|
commit_message: Fixes (sanity and consistency, auto)
|