forked from MTSR/mapserver
build workflow fix (don't run docker login in PR's)
This commit is contained in:
parent
7e8dcdc77b
commit
43fb542fc1
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@ -42,12 +42,15 @@ jobs:
|
||||
run: |
|
||||
go test ./...
|
||||
|
||||
# only on tags or the master branch
|
||||
- name: Docker Login
|
||||
if: success() && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master')
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USERNAME }}
|
||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||
|
||||
# only on tags
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
if: success() && startsWith(github.ref, 'refs/tags/')
|
||||
@ -57,6 +60,7 @@ jobs:
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
# only on the master branch
|
||||
- name: Build and push latest docker image
|
||||
if: success() && github.ref == 'refs/heads/master'
|
||||
run: |
|
||||
|
Loading…
Reference in New Issue
Block a user