Skip to content

Commit

Permalink
Get rid of predefined IMAGE_NAME too
Browse files Browse the repository at this point in the history
  • Loading branch information
jspahrsummers committed Dec 14, 2019
1 parent edf51db commit f659898
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ on:

pull_request:

env:
IMAGE_NAME: ib-gateway-docker

jobs:
build:
runs-on: ubuntu-latest
Expand All @@ -21,7 +18,7 @@ jobs:
- uses: actions/checkout@v1

- name: Build Docker image
run: docker build . -t "$IMAGE_NAME"
run: docker build . -t image

- name: Log in to GitHub Package Registry
if: github.event_name == 'push'
Expand All @@ -30,6 +27,7 @@ jobs:
- name: Push image
if: github.event_name == 'push'
run: |
IMAGE_NAME=$(basename "${{ github.repository }}")
IMAGE_ID="docker.pkg.github.com/${{ github.repository }}/$IMAGE_NAME"
VERSION=$(basename "${{ github.ref }}")
Expand All @@ -38,5 +36,5 @@ jobs:
VERSION=latest
fi
docker tag "$IMAGE_NAME" "$IMAGE_ID:$VERSION"
docker tag image "$IMAGE_ID:$VERSION"
docker push "$IMAGE_ID:$VERSION"

0 comments on commit f659898

Please sign in to comment.