Skip to content

Commit

Permalink
Fixing pipeline tagging (#508)
Browse files Browse the repository at this point in the history
  • Loading branch information
ausias-armesto authored May 3, 2024
1 parent b2d4773 commit 711b2a9
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,13 @@ jobs:

- name: Calculate environment variables
shell: sh
run: echo "SHORT_SHA=`echo ${{ github.event.pull_request.head.sha }} | cut -c1-7`" >> $GITHUB_ENV
run: |
commit_hash="${{ github.event.pull_request.head.sha }}"
if [ -z "${commit_hash}" ]; then
echo "docker_tag=latest" >> $GITHUB_ENV
else
echo "docker_tag=`echo ${commit_hash} | cut -c1-7`" >> $GITHUB_ENV
fi
- name: Set up Google Cloud Credentials
id: auth
Expand All @@ -77,4 +83,4 @@ jobs:
with:
push: true
context: ct-app
tags: europe-west3-docker.pkg.dev/hoprassociation/docker-images/cover-traffic:latest
tags: europe-west3-docker.pkg.dev/hoprassociation/docker-images/cover-traffic:${{ env.docker_tag }}

0 comments on commit 711b2a9

Please sign in to comment.