Simplify workflows

This commit is contained in:
Andrii Siriak 2021-09-26 11:56:07 +03:00
parent 5a006eee0a
commit b424c32171
No known key found for this signature in database
GPG Key ID: 165FBC99465D381C
4 changed files with 10 additions and 29 deletions

View File

@ -1,11 +1,5 @@
name: Build Project
on:
pull_request:
push:
branches:
- master
name: Build
on: push
jobs:
build:
runs-on: ubuntu-latest

View File

@ -1,10 +1,5 @@
name: Code Formatter
on:
push:
paths:
- "**.java"
name: Format Code
on: push
jobs:
format:
runs-on: ubuntu-latest
@ -23,5 +18,5 @@ jobs:
git config --global user.name github-actions
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com'
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git commit -am "Formatted with Google Java Formatter" || true
git commit -am "Format with Google Java Formatter" || true
git push --force origin HEAD:$GITHUB_REF || true

View File

@ -1,16 +1,8 @@
name: Prettier
on:
pull_request:
push:
branches:
- master
- Development
name: Prettify
on: push
jobs:
prettier:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
@ -21,6 +13,6 @@ jobs:
uses: creyD/prettier_action@v3.3
with:
prettier_options: --write **/*.{java}
commit_message: 'style: prettify code'
commit_message: 'Prettify code'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@ -1,6 +1,6 @@
# This GitHub Action updates the DIRECTORY.md file (if needed) when doing a git push
name: update_directory_md
on: [push]
name: Update Directory
on: push
jobs:
update_directory_md:
runs-on: ubuntu-latest