Skip to content

Commit

Permalink
added versuib abd short SHA to envs
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexDyakonov committed Jan 29, 2025
1 parent 9a3d4e6 commit a646ef1
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/cd-production.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,21 @@ jobs:
- name: Check out the repo
uses: actions/checkout@v4

- name: Set short git commit SHA
id: vars
run: |
calculatedSha=$(git rev-parse --short ${{ github.sha }})
echo "COMMIT_SHORT_SHA=$calculatedSha" >> $GITHUB_ENV
- name: Determine Version tag
id: tag
run: |
if [ "${{ github.event_name }}" == "release" ]; then
echo "VERSION_TAG=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
else
echo "VERSION_TAG=${{ env.COMMIT_SHORT_SHA }}" >> $GITHUB_ENV
fi
- name: Log in to Docker Hub
uses: docker/login-action@v2
Expand All @@ -44,7 +59,7 @@ jobs:
push: true
tags: |
${{ secrets.DOCKER_USERNAME }}/dishdash-dashboard:latest
${{ secrets.DOCKER_USERNAME }}/dishdash-dashboard:${{ github.event.inputs.tag_name }}
${{ secrets.DOCKER_USERNAME }}/dishdash-dashboard:${{ env.VERSION_TAG }}
- name: Docker hub push notification
uses: containrrr/shoutrrr-action@v1
Expand Down

0 comments on commit a646ef1

Please sign in to comment.