Skip to content

Commit

Permalink
improve release github action (#326)
Browse files Browse the repository at this point in the history
  • Loading branch information
wph95 committed Aug 22, 2022
1 parent 40915a4 commit 93110cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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

0 comments on commit 93110cf

Please sign in to comment.