Skip to content

Commit

Permalink
Update format-tidy.yml (#444)
Browse files Browse the repository at this point in the history
* Update format-tidy.yml

* Update test.yml

* Update test.yml

* Update test.yml

* Update test.yml
  • Loading branch information
jackton1 committed Mar 22, 2023
1 parent bfae19d commit c84d8bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/format-tidy.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
name: Format & Tidy go.mod
on:
push:
paths:
- '**.go'
- '**.mod'
- 'Makefile'
- '.github/workflows/format-tidy.yml'
branches:
- 'main'
pull_request:
paths:
- '**.go'
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ jobs:
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
fetch-depth: 0 # otherwise, you will fail to push refs to dest repo
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token

- name: Setup go
uses: actions/setup-go@v4
Expand Down Expand Up @@ -159,15 +160,16 @@ jobs:
test/**
- name: Commit README changes
if: github.event.pull_request.head.repo.owner.login == github.repository_owner && steps.verify-changed-files.outputs.files_changed == 'true'
if: github.event.pull_request.head.repo.owner.login == github.repository_owner && steps.verify-changed-files.outputs.files_changed == 'true' && matrix.platform == 'ubuntu-latest'

run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git add ${{ steps.verify-changed-files.outputs.changed_files }}
git commit -m "Updated README."
- name: Push README changes
if: github.event.pull_request.head.repo.owner.login == github.repository_owner && steps.verify-changed-files.outputs.files_changed == 'true'
if: github.event.pull_request.head.repo.owner.login == github.repository_owner && steps.verify-changed-files.outputs.files_changed == 'true' && matrix.platform == 'ubuntu-latest'
uses: ad-m/github-push-action@master
continue-on-error: true
with:
Expand Down

0 comments on commit c84d8bc

Please sign in to comment.