Skip to content

Commit

Permalink
fix publishing image (#16)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored Apr 21, 2022
1 parent 382af61 commit d2f5866
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions .github/workflows/publish_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,8 @@ name: Publish Docker image

on:
push:
tags: '*'

defaults:
run:
shell: bash
tags:
- '*'

jobs:
push_to_registry:
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit d2f5866

Please sign in to comment.