From 93110cf48ebe093b2c8dc48c337fe1aa8559461d Mon Sep 17 00:00:00 2001 From: JustWPH <2732352+wph95@users.noreply.github.com> Date: Mon, 22 Aug 2022 08:46:19 -0700 Subject: [PATCH] improve release github action (#326) --- .github/workflows/release.yml | 2 ++ Makefile | 6 +++--- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0900d7be61..c26d2719fa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,6 +13,8 @@ jobs: env: RELEASE_VERSION: "${{ github.event.release.tag_name }}" + DOCKERHUB_REPO: "otel/demo" + GHCR_REPO: "ghcr.io/open-telemetry/demo" steps: - uses: actions/checkout@v3 diff --git a/Makefile b/Makefile index 4745761b88..f35c94ed1b 100644 --- a/Makefile +++ b/Makefile @@ -61,7 +61,7 @@ install-tools: $(MISSPELL) .PHONY: build-and-push-dockerhub build-and-push-dockerhub: docker compose --env-file .dockerhub.env -f docker-compose.yml build - docker compose --env-file .dockerhub.env -f docker-compose.yml pusd + docker compose --env-file .dockerhub.env -f docker-compose.yml push .PHONY: build-and-push-ghcr build-and-push-ghcr: @@ -72,7 +72,7 @@ build-and-push-ghcr: build-env-file: cp .env .dockerhub.env sed -i '/IMAGE_VERSION=.*/c\IMAGE_VERSION=${RELEASE_VERSION}' .dockerhub.env - sed -i '/IMAGE_NAME=.*/c\IMAGE_NAME=otel/demo' .dockerhub.env + sed -i '/IMAGE_NAME=.*/c\IMAGE_NAME=${DOCKERHUB_REPO}' .dockerhub.env cp .env .ghcr.env sed -i '/IMAGE_VERSION=.*/c\IMAGE_VERSION=${RELEASE_VERSION}' .ghcr.env - sed -i '/IMAGE_NAME=.*/c\IMAGE_NAME=ghcr.io/open-telemetry/demo' .ghcr.env + sed -i '/IMAGE_NAME=.*/c\IMAGE_NAME=${GHCR_REPO}' .ghcr.env \ No newline at end of file