1
0
forked from MTSR/mapserver

build workflow fix (don't run docker login in PR's)

This commit is contained in:
BuckarooBanzay 2022-12-16 08:12:57 +01:00
parent 7e8dcdc77b
commit 43fb542fc1

View File

@ -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: |