From d2f5866244602071c02759f4a142037e001e7405 Mon Sep 17 00:00:00 2001 From: Jeff Ohrstrom Date: Thu, 21 Apr 2022 14:50:40 -0400 Subject: [PATCH] fix publishing image (#16) --- .github/workflows/publish_image.yml | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/.github/workflows/publish_image.yml b/.github/workflows/publish_image.yml index 9a277e9..cbd944c 100644 --- a/.github/workflows/publish_image.yml +++ b/.github/workflows/publish_image.yml @@ -2,11 +2,8 @@ name: Publish Docker image on: push: - tags: '*' - -defaults: - run: - shell: bash + tags: + - '*' jobs: push_to_registry: @@ -17,7 +14,7 @@ jobs: uses: actions/checkout@v2 - name: setup the environment run: | - TAG=${GITHUB_REF#refs/heads/} + TAG=${GITHUB_REF#refs/*/} REPO="docker.io/ohiosupercomputer" echo "LATEST_IMG=$REPO/ood-doc-build:latest" >> $GITHUB_ENV echo "VERSIONED_IMG=$REPO/ood-doc-build:$TAG" >> $GITHUB_ENV @@ -26,7 +23,7 @@ jobs: docker build -t $LATEST_IMG . docker tag $LATEST_IMG $VERSIONED_IMG - name: login to dockerhub - run: docker login -u oscrobot -p ${{ secrets.OSC_ROBOT_DOCKERHUB_TOKEN }} + run: docker login -u ${{ secrets.OSC_ROBOT_DOCKERHUB_USER }} -p ${{ secrets.OSC_ROBOT_DOCKERHUB_TOKEN }} - name: push images to dockerhub run: | docker push $LATEST_IMG