trustwallet-assets/.github/workflows/formatter.yml
mykola.eth 440bc104de
Add daily update action and formatter (#1882)
* Run image compression on very push to master

* Add contract in lowercase for test

* Add daily updater

* Add formatter on every pull,push to branches

* Remove  dublicates

* Fix run syntax

* Fix syntax

* Run image compression only when push to master

* Run formater on all PR, exept master

* Add npm cache

* Add branches

* Try fix rename issue on ci

* Add trailing slash

* remove trailing

* Move uses in step

* remove dash from uses

* Run each npm run individually

* remove name

* remove checksum

* rename to jpg

* Add AMATEN (AMA) lowercase

* debug

* Run checksum after formating

* USet lates checkout and commit to branch innsted deatached head

* Checkout to branch in checkout

* Fix version

* Add formating

* Add formating

Co-authored-by: kolya182 <kolya182@users.noreply.github.com>
2020-04-16 19:27:40 -07:00

37 lines
1.0 KiB
YAML

name: Formatter
on:
push:
branches:
- '*'
- '!master'
pull_request:
branches:
- 'master'
jobs:
format:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.DANGER_GITHUB_API_TOKEN }}
- uses: actions/setup-node@v1.4.1
with:
node-version: '12.x'
- name: Restore npm cache
uses: actions/cache@v1
with:
id: cache-npm
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
- name: Install Dependencies
if: steps.cache-npm.outputs.cache-hit != 'true'
run: npm ci
- run: npm run format:all
- run: npm run resize
- name: Commit daily changes if new updates
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: Add formating