Skip to content

Commit

Permalink
extract tag names, update conditionals
Browse files Browse the repository at this point in the history
  • Loading branch information
joemaller authored Apr 17, 2020
1 parent 751ad4a commit c6e7ca1
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions .github/workflows/dockerhub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ on:
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASS: ${{ secrets.DOCKER_PASS }}
DOCKER_TAG: ${{ github.event.release.tag_name }}
jobs:

build:
Expand All @@ -32,9 +31,9 @@ jobs:
run: docker push ideasonpurpose/docker-build

- name: '[RELEASE] Tag image with release version'
if: github.event == 'release'
run: docker tag ideasonpurpose/docker-build ideasonpurpose/docker-build:$DOCKER_TAG
if: startsWith( github.ref, 'refs/tags/`)
run: docker tag ideasonpurpose/docker-build ideasonpurpose/docker-build:${GITHUB_REF/refs\/tags\/v/}

- name: '[RELEASE] Deploy release-tagged image to Docker Hub'
if: github.event == 'release'
run: docker push ideasonpurpose/docker-build:$DOCKER_TAG
if: startsWith( github.ref, 'refs/tags/`)
run: docker push ideasonpurpose/docker-build:${GITHUB_REF/refs\/tags\/v/}

0 comments on commit c6e7ca1

Please sign in to comment.