push to dockerhub tagged with branch name

This commit is contained in:
knoxfighter 2021-01-14 20:59:51 +01:00
parent f2a3dc0ec3
commit 858401c0cf

View File

@ -60,9 +60,10 @@ jobs:
docker-push:
needs: [test-npm, test-go]
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/develop'
if: github.event_name == 'push' && github.ref != 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: rlespinasse/github-slug-action@v3.x
- uses: actions/setup-node@v1
- uses: actions/setup-go@v2
- uses: docker/setup-buildx-action@v1
@ -78,4 +79,4 @@ jobs:
context: ./docker/
file: ./docker/Dockerfile-local
push: true
tags: ofsm/ofsm:develop
tags: ofsm/ofsm:${{ env.GITHUB_REF_SLUG }}