From 2c919b7f82dd4ecbac68b1414053804b5529f82d Mon Sep 17 00:00:00 2001 From: Mark Piper Date: Fri, 30 Aug 2024 13:22:11 -0600 Subject: [PATCH] Set the image name in the release ci workflow I tried to be clever and get it from the github context, but I don't want the '-docker' at the end of the repository name. --- .github/workflows/release.yml | 5 ++++- README.md | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dc1feb0..ff8f0f0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,6 +6,9 @@ on: - 'v[0-9]+.[0-9]+.[0-9]+' - '!v[0-9]+.[0-9]+.[0-9]+[ab][0-9]+' +env: + REPO: csdms/bmi-example-c + jobs: build-and-push: @@ -32,4 +35,4 @@ jobs: with: platforms: linux/amd64,linux/arm64 push: true - tags: ${{ github.repository }}:latest,${{ github.repository }}:${{ steps.vars.outputs.version }} + tags: ${{ env.REPO }}:latest,${{ env.REPO }}:${{ steps.vars.outputs.version }} diff --git a/README.md b/README.md index 843d073..fc0ce48 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ cat bmiheatc.out ## Developer notes A versioned, multiplatform image built from this repository is hosted on Docker Hub -at [csdms/bmi-example-c](https://hub.docker.com/repository/docker/csdms/bmi-example-c-docker/). +at [csdms/bmi-example-c](https://hub.docker.com/repository/docker/csdms/bmi-example-c/). This image is automatically built and pushed to Docker Hub with the [release](./.github/workflows/release.yml) CI workflow. The workflow is only run when the repository is tagged.