mirror of https://github.com/MedzikUser/go-pingbot
Update ci.yml
This commit is contained in:
parent
230b2880c4
commit
4aa06d8389
|
@ -4,6 +4,7 @@ on:
|
|||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
pull_request:
|
||||
|
||||
permissions:
|
||||
|
@ -12,6 +13,7 @@ permissions:
|
|||
jobs:
|
||||
ci:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Repo clone (go mod tidy / gofmt)
|
||||
if: github.event_name != 'pull_request'
|
||||
|
@ -30,14 +32,14 @@ jobs:
|
|||
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git config --local user.name "github-actions[bot]"
|
||||
|
||||
- name: tidy
|
||||
- name: Tidy
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
go mod tidy -go=1.17
|
||||
git add .
|
||||
git diff-index --quiet HEAD || git commit -m "go mod tidy"
|
||||
|
||||
- name: gofmt
|
||||
- name: GoFmt
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
go fmt ./...
|
||||
|
@ -66,6 +68,13 @@ jobs:
|
|||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Login to DockerHub
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
with:
|
||||
|
|
Loading…
Reference in New Issue