Skip to content

Commit

Permalink
tag api image with version tag (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
ekorman authored Sep 27, 2023
1 parent ec41822 commit 2796aa4
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
- api/**
- .github/workflows/docker.yml
branches: [main]
tags:
- "v*"

jobs:
build-and-publish-docker:
Expand All @@ -28,3 +30,10 @@ jobs:
IMAGE_NAME_WITH_COMMIT_HASH=$IMAGE_NAME:${{ github.sha }}
docker tag $IMAGE_NAME $IMAGE_NAME_WITH_COMMIT_HASH
docker push $IMAGE_NAME_WITH_COMMIT_HASH
# if there's a git tag then add another tag to the image with the git tag and push it
- name: push git tag
if: startsWith(github.ref, 'refs/tags/')
run: |
TAG=$(git describe --tags --abbrev=0)
docker tag $IMAGE_NAME $IMAGE_NAME:$TAG
docker push $IMAGE_NAME:$TAG
6 changes: 6 additions & 0 deletions .github/workflows/tests-and-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Unit, functional, integration tests and code coverage

on:
push:
paths:
- "api/**"
- "client/**"
- "tests/**"
- "docs/**"
branches: "**"

jobs:
backend-functional-tests:
Expand Down

0 comments on commit 2796aa4

Please sign in to comment.