Skip to content

Commit

Permalink
use GITHUB_REF_NAME for tags in deploy-testing github action
Browse files Browse the repository at this point in the history
  • Loading branch information
zcernigoj committed Oct 19, 2023
1 parent 19b78bc commit 9d7193f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/deploy_testing.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
run: |
echo "Tag name from GITHUB_REF_NAME: $GITHUB_REF_NAME"
echo "Tag name from github.ref_name: ${{ github.ref_name }}"
echo "Tag name from github.ref_name: ${{ env.GITHUB_REF_NAME }}"
echo "Tag name from GITHUB_REF_TAG: ${{ GITHUB_REF_TAG }}"
- name: Set up Python
uses: actions/setup-python@v4
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:

- name: build docker image with correct tags
working-directory: ./rest
run: docker build -t "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:$GITHUB_REF_TAG" -t "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:latest" --build-arg VERSION=$GITHUB_REF_TAG --build-arg VCS_REF=$GITHUB_SHA --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') .
run: docker build -t "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:$GITHUB_REF_NAME" -t "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:latest" --build-arg VERSION=$GITHUB_REF_NAME --build-arg VCS_REF=$GITHUB_SHA --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') .

- name: login for AWS ECR docker
working-directory: ./rest
Expand All @@ -105,7 +105,7 @@ jobs:
- name: push docker images (versioned with CI tag and "latest") to AWS ECR with docker
working-directory: ./rest
run: |
docker push "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:$GITHUB_REF_TAG"
docker push "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:$GITHUB_REF_NAME"
docker push "$TESTING_ECR_REGISTRY/$TESTING_ECR_REGISTRY_IMAGE:latest"
- name: deploy lambda with new docker image
Expand Down

0 comments on commit 9d7193f

Please sign in to comment.