Skip to content

Commit

Permalink
Merge pull request #7 from MinaFoundation/adjust-docker-publish-workflow
Browse files Browse the repository at this point in the history
PM-1436 adjust docker publish workflow
  • Loading branch information
piotr-iohk authored Apr 11, 2024
2 parents 75f333b + d0651e5 commit 2535b01
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,17 @@ jobs:
uses: actions/checkout@v3
- name: 🏷️ Generate Tag
run: |
BRANCH_OR_TAG=$(basename ${{ github.ref }})
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
PREFIX=${{ env.DOCKER_TAG_PREFIX }}
SHORT_SHA=$(echo $GITHUB_SHA | cut -c1-7)
echo "TAG=$PREFIX-$BRANCH_OR_TAG-$SHORT_SHA" >> $GITHUB_ENV
elif [ "${{ github.event_name }}" == "push" ] && [ -n "${{ github.event.ref }}" ]; then
PREFIX=$(basename ${{ github.ref }})
echo "TAG=$BRANCH_OR_TAG" >> $GITHUB_ENV
else
echo "Invalid event. Exiting..."
exit 1
fi
echo "TAG=$PREFIX-$(echo $GITHUB_SHA | cut -c1-7)" >> $GITHUB_ENV
- name: 🔑 ECR Login
id: login-ecr
uses: aws-actions/amazon-ecr-login@v1
Expand Down

0 comments on commit 2535b01

Please sign in to comment.