Skip to content

Commit

Permalink
Merge pull request #688 from kids-first/update-tag-version-for-docker
Browse files Browse the repository at this point in the history
🐛 Update Tag of dataservice image
  • Loading branch information
haynescd authored Sep 9, 2024
2 parents 4646d95 + 3635551 commit ae8831e
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,15 @@ jobs:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set git tag and SHA
run: |
VERSION=$(git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 1-7)
SHORT_SHA=${GITHUB_SHA:0:7}
TAG="${VERSION}-${SHORT_SHA}"
echo "TAG=${TAG}" >> $GITHUB_ENV
- name: "Build and Publish"
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ghcr.io/kids-first/kf-api-dataservice/kf-api-dataservice:dev-release-${ git tag --sort=committerdate | grep -E '[0-9]' | tail -1 | cut -b 1-7 }-${GITHUB_SHA:0:7}
tags: ghcr.io/kids-first/kf-api-dataservice/kf-api-dataservice:dev-release-${{ env.TAG }}

0 comments on commit ae8831e

Please sign in to comment.