mirror of https://github.com/MedzikUser/go-pingbot
workflows fix
This commit is contained in:
parent
aa06d6e32f
commit
67258a2315
|
@ -18,44 +18,26 @@ jobs:
|
||||||
with:
|
with:
|
||||||
go-version: 1.17
|
go-version: 1.17
|
||||||
|
|
||||||
- name: Mod Tidy
|
- name: Setup Git
|
||||||
run: go mod tidy
|
|
||||||
- name: Commit
|
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
git config --local user.name "github-actions[bot]"
|
git config --local user.name "github-actions[bot]"
|
||||||
|
|
||||||
|
- name: Mod Tidy
|
||||||
|
run: |
|
||||||
|
go mod tidy
|
||||||
git add .
|
git add .
|
||||||
git diff-index --quiet HEAD || git commit -m "go mod tidy"
|
git diff-index --quiet HEAD || git commit -m "go mod tidy"
|
||||||
|
|
||||||
- name: Push changes
|
|
||||||
uses: ad-m/github-push-action@master
|
|
||||||
with:
|
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
branch: ${{ github.ref }}
|
|
||||||
gofmt:
|
|
||||||
needs: tidy
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v2
|
|
||||||
with:
|
|
||||||
go-version: 1.17
|
|
||||||
|
|
||||||
- name: gofmt
|
- name: gofmt
|
||||||
run: go fmt ./...
|
|
||||||
- name: Commit
|
|
||||||
run: |
|
run: |
|
||||||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
go fmt ./..
|
||||||
git config --local user.name "github-actions[bot]"
|
|
||||||
git add .
|
git add .
|
||||||
git diff-index --quiet HEAD || git commit -m "gofmt"
|
git diff-index --quiet HEAD || git commit -m "gofmt"
|
||||||
|
|
||||||
|
- name: Pull changes
|
||||||
|
run: git pull -r
|
||||||
|
|
||||||
- name: Push changes
|
- name: Push changes
|
||||||
uses: ad-m/github-push-action@master
|
uses: ad-m/github-push-action@master
|
||||||
with:
|
with:
|
||||||
|
|
|
@ -28,8 +28,8 @@ jobs:
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Remove Local Changes
|
- name: Checkout
|
||||||
run: git stash -u
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
|
|
Loading…
Reference in New Issue