Skip to content

Commit

Permalink
chore: fix Docker image tag (#703)
Browse files Browse the repository at this point in the history
  • Loading branch information
eshanholtz committed Oct 29, 2021
1 parent 1f0a03f commit 345c980
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ jobs:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_AUTH_TOKEN }}

# The expression strips off the shortest match from the front of the string to yield just the tag name as the output
- name: Get tagged version
run: echo "GITHUB_TAG=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV

- name: Build and Push image
run: make docker-build && make docker-push

Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ clean:
API_DEFINITIONS_SHA=$(shell git log --oneline | grep Regenerated | head -n1 | cut -d ' ' -f 5)
docker-build:
docker build -t twilio/twilio-node .
docker tag twilio/twilio-node twilio/twilio-node:${TRAVIS_TAG}
docker tag twilio/twilio-node twilio/twilio-node:${GITHUB_TAG}
docker tag twilio/twilio-node twilio/twilio-node:apidefs-${API_DEFINITIONS_SHA}
docker tag twilio/twilio-node twilio/twilio-node:latest

docker-push:
echo "${DOCKER_PASSWORD}" | docker login -u "${DOCKER_USERNAME}" --password-stdin
docker push twilio/twilio-node:${TRAVIS_TAG}
docker push twilio/twilio-node:${GITHUB_TAG}
docker push twilio/twilio-node:apidefs-${API_DEFINITIONS_SHA}
docker push twilio/twilio-node:latest

0 comments on commit 345c980

Please sign in to comment.