-
-
Notifications
You must be signed in to change notification settings - Fork 538
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
/.github/{markdown-templates, workflows}: split format and verify wor…
…kflows, update bump depedency workflow
- Loading branch information
1 parent
3fa5d64
commit ce42242
Showing
4 changed files
with
83 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Format PR | ||
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
|
||
jobs: | ||
format: | ||
name: Format PR | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- name: Setup Go 1.x | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.15 | ||
- uses: actions/checkout@v2 | ||
with: | ||
token: ${{ secrets.REPO_ACCESS_TOKEN || secrets.GITHUB_TOKEN }} | ||
- name: Install goimports | ||
run: go get golang.org/x/tools/cmd/goimports | ||
- name: Format repo and update licenses | ||
working-directory: ./go | ||
run: | | ||
./utils/repofmt/format_repo.sh | ||
./Godeps/update.sh | ||
env: | ||
BRANCH_NAME: ${{ github.head_ref }} | ||
CHANGE_TARGET: ${{ github.base_ref }} | ||
- name: Changes detected | ||
id: detect-changes | ||
run: | | ||
changes=$(git status --porcelain) | ||
if [ ! -z "$changes" ]; then | ||
echo "::set-output name=has-changes::true" | ||
fi | ||
- uses: EndBug/add-and-commit@v7 | ||
if: ${{ steps.detect-changes.outputs.has-changes == 'true' }} | ||
with: | ||
message: "[ga-format-pr] Run go/utils/repofmt/format_repo.sh and go/Godeps/update.sh" | ||
add: "." | ||
cwd: "." |