Skip to content

Commit

Permalink
use image version main for images built from main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Qingchuan Hao committed Jul 29, 2022
1 parent 2d0d91c commit cb08336
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/publish-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ permissions:
env:
REGISTRY: ghcr.io
HUB_AGENT_IMAGE_NAME : hub-agent
HUB_AGENT_IMAGE_VERSION: v0.1.0.ci
HUB_AGENT_IMAGE_VERSION: main
MEMBER_AGENT_IMAGE_NAME: member-agent
MEMBER_AGENT_IMAGE_VERSION: v0.1.0.ci
MEMBER_AGENT_IMAGE_VERSION: main
REFRESH_TOKEN_IMAGE_NAME: refresh-token
REFRESH_TOKEN_IMAGE_VERSION: v0.1.0.ci
REFRESH_TOKEN_IMAGE_VERSION: main

jobs:
export-registry:
Expand All @@ -41,6 +41,12 @@ jobs:
with:
submodules: true
fetch-depth: 0
- name: Set image version for a new release
if: startsWith(github.ref, 'refs/tags/')
run: |
echo "MEMBER_AGENT_IMAGE_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "HUB_AGENT_IMAGE_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
echo "REFRESH_TOKEN_IMAGE_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Login to ${{ env.REGISTRY }}
uses: docker/login-action@49ed152c8eca782a232dede0303416e8f356c37b
with:
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ install-hub-agent-helm:
kind export kubeconfig --name $(HUB_KIND_CLUSTER_NAME)
helm install hub-agent ./charts/hub-agent/ \
--set image.pullPolicy=Never \
--set image.repository=$(REGISTRY)/$(HUB_AGENT_IMAGE_NAME)
--set image.repository=$(REGISTRY)/$(HUB_AGENT_IMAGE_NAME) \
--set image.tag=$(HUB_AGENT_IMAGE_VERSION)

.PHONY: e2e-hub-kubeconfig-secret
Expand Down

0 comments on commit cb08336

Please sign in to comment.