Skip to content

Commit

Permalink
add manual run flow
Browse files Browse the repository at this point in the history
  • Loading branch information
lassemand committed Sep 13, 2024
1 parent dc731dd commit 323b652
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 8 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/release-kpi-tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ on:
tags:
- kpi-tracker/*.*.*

workflow_dispatch:

env:
REGISTRY: docker.io
IMAGE_NAME: kpi-tracker
SERVICE_NAME: kpi-tracker
RUST_VERSION: rust:1.76-buster

jobs:
publish-docker-image:
Expand All @@ -28,14 +31,14 @@ jobs:
- name: Extract version tag from Cargo.toml manifest.
id: meta
run: |
export VERSION=$(yq .package.version kpi-tracker/Cargo.toml)
export FULL_IMAGE_TAG="${{ env.REGISTRY }}/concordium/$IMAGE_NAME:$VERSION"
export VERSION=$(yq .package.version ${{ env.SERVICE_NAME }}/Cargo.toml)
export FULL_IMAGE_TAG="${{ env.REGISTRY }}/concordium/${{ env.SERVICE_NAME }}:$VERSION"
echo "::notice FULL_IMAGE_TAG=${FULL_IMAGE_TAG}"
# Make sure the image does not exist. Abort if we can retrieve any metadata.
if docker manifest inspect ${FULL_IMAGE_TAG} > /dev/null; then
echo "::error ${FULL_IMAGE_TAG} already exists"
exit 1
elif [ ! "${{ github.ref_name }}" = "kpi-tracker/${VERSION}" ]; then
elif [ ! "${{ github.ref_name }}" = "${{ env.SERVICE_NAME }}/${VERSION}" ]; then
echo "::error Expected tag ${EXPECTED_TAG} does not match the version ${VERSION}."
exit 1
else
Expand All @@ -46,7 +49,7 @@ jobs:
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
with:
context: .
file: ./kpi-tracker/scripts/Dockerfile
file: ./${{ SERVICE_NAME }}/scripts/Dockerfile
push: true
platforms: linux/amd64
tags: ${{ steps.meta.outputs.tag }}
2 changes: 1 addition & 1 deletion kpi-tracker/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion kpi-tracker/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "concordium-kpi-tracker"
version = "2.1.0"
version = "2.1.1"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand Down

0 comments on commit 323b652

Please sign in to comment.