Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

run prettier in github actions #435

Merged
merged 1 commit into from
Nov 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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