Skip to content

Commit

Permalink
run prettier in github actions + fix github actions username and email
Browse files Browse the repository at this point in the history
  • Loading branch information
antonilol committed Oct 2, 2022
1 parent 482530b commit 5cc2f6c
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 29 deletions.
27 changes: 0 additions & 27 deletions .github/workflows/lint_and_build.yml

This file was deleted.

30 changes: 30 additions & 0 deletions .github/workflows/lint_format_and_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Lint, format and build
on:
push:
branches:
- master

jobs:
lint-format-build:
name: Lint, format and build
runs-on:
- ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: install npm dependencies
run: npm i
- name: lint, format, build and push automatic fixes
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
shopt -s globstar
npm run lint || echo -n
npx prettier --config .prettierrc --ignore-path .prettierignore -w *.ts src/**/*.ts .github/**/*.yml
git add src
git commit -m 'Lint and format code' || echo -n
git push
npm run build
git add dist
git commit -m 'Automatic build' || echo -n
git push
4 changes: 2 additions & 2 deletions .github/workflows/update_proto.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ jobs:
path: lnd
- name: update proto files
run: |
git config user.name 'github-actions[bot]'
git config user.email '41898282+github-actions[bot]@users.noreply.github.com'
find lnd/lnrpc -name '*.proto' -exec bash -c 'test -e proto/`basename {}` && cp {} proto' \;
sed -i 's/^import.*\//import "/' proto/*
git config user.name 'Github Actions'
git config user.email [email protected]
git add proto
git commit -m "Update proto files" || echo -n
git push

0 comments on commit 5cc2f6c

Please sign in to comment.