Renamed confusion matrix components. (#825) #178
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Builds and publishes a docker image for the back end service | |
on: | |
push: | |
paths: | |
- api/** | |
- migrations/** | |
- .github/workflows/docker.yml | |
branches: [main] | |
tags: | |
- "v*" | |
permissions: | |
id-token: write | |
contents: read | |
packages: write | |
jobs: | |
build-and-publish-docker-migrations: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./migrations | |
env: | |
IMAGE_NAME: ghcr.io/striveworks/valor/migrations | |
IMAGE_NAME_WITH_COMMIT_HASH: ${IMAGE_NAME}:${{ github.sha }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build | |
run: | | |
docker build . -t ${IMAGE_NAME} | |
- name: push | |
run: | | |
docker push ${IMAGE_NAME} | |
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} | |
- 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} | |
build-and-publish-docker-service: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./api | |
env: | |
IMAGE_NAME: ghcr.io/striveworks/valor/valor-service | |
IMAGE_NAME_WITH_COMMIT_HASH: ${IMAGE_NAME}:${{ github.sha }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: docker/login-action@v3 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: build | |
run: | | |
pip3 install setuptools_scm | |
docker build --build-arg VERSION=$(python -m setuptools_scm) . -t ${IMAGE_NAME} | |
- name: push | |
run: | | |
docker push ${IMAGE_NAME} | |
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} |