From b424c32171332cc03d3710d3594ded470549c289 Mon Sep 17 00:00:00 2001 From: Andrii Siriak Date: Sun, 26 Sep 2021 11:56:07 +0300 Subject: [PATCH] Simplify workflows --- .github/workflows/build.yml | 10 ++-------- .github/workflows/checkstyle.yml | 11 +++-------- .github/workflows/prettier.yml | 14 +++----------- ...pdate_directory_md.yml => update_directory.yml} | 4 ++-- 4 files changed, 10 insertions(+), 29 deletions(-) rename .github/workflows/{update_directory_md.yml => update_directory.yml} (98%) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d77e3e76..8376551a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,11 +1,5 @@ -name: Build Project - -on: - pull_request: - push: - branches: - - master - +name: Build +on: push jobs: build: runs-on: ubuntu-latest diff --git a/.github/workflows/checkstyle.yml b/.github/workflows/checkstyle.yml index b6bda249..f85bfc66 100644 --- a/.github/workflows/checkstyle.yml +++ b/.github/workflows/checkstyle.yml @@ -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 diff --git a/.github/workflows/prettier.yml b/.github/workflows/prettier.yml index 35595927..8fc309fd 100644 --- a/.github/workflows/prettier.yml +++ b/.github/workflows/prettier.yml @@ -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 }} diff --git a/.github/workflows/update_directory_md.yml b/.github/workflows/update_directory.yml similarity index 98% rename from .github/workflows/update_directory_md.yml rename to .github/workflows/update_directory.yml index 325fa045..4b58314c 100644 --- a/.github/workflows/update_directory_md.yml +++ b/.github/workflows/update_directory.yml @@ -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