Skip to content

Commit

Permalink
GHA add branch name
Browse files Browse the repository at this point in the history
  • Loading branch information
foxish committed Nov 7, 2023
1 parent 5ed51ac commit 99826bf
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,8 @@ jobs:
/signadot sandbox apply \
--set github-pr=${{ github.event.number }} \
--set image=signadot/hotrod:${IMAGE_TAG} \
--set git-branch=pr-${{ github.event.number }}-route \
--set branch=${{ github.ref_name }} \
--set name=pr-${{ github.event.number }}-route \
-f - \
-o yaml \
< ${GITHUB_WORKSPACE}/.signadot/route-template.yaml \
Expand Down Expand Up @@ -188,7 +189,8 @@ jobs:
/signadot sandbox apply \
--set github-pr=${{ github.event.number }} \
--set image=signadot/hotrod:${IMAGE_TAG} \
--set git-branch=pr-${{ github.event.number }}-frontend \
--set branch=${{ github.ref_name }} \
--set name=pr-${{ github.event.number }}-frontend \
-f - \
-o yaml \
< ${GITHUB_WORKSPACE}/.signadot/frontend-template.yaml \
Expand Down Expand Up @@ -224,7 +226,8 @@ jobs:
/signadot sandbox apply \
--set github-pr=${{ github.event.number }} \
--set image=signadot/hotrod:${IMAGE_TAG} \
--set git-branch=pr-${{ github.event.number }}-customer \
--set branch=${{ github.ref_name }} \
--set name=pr-${{ github.event.number }}-customer \
-f - \
-o yaml \
< ${GITHUB_WORKSPACE}/.signadot/customer-template.yaml \
Expand Down Expand Up @@ -259,7 +262,8 @@ jobs:
/signadot sandbox apply \
--set github-pr=${{ github.event.number }} \
--set image=signadot/hotrod:${IMAGE_TAG} \
--set git-branch=pr-${{ github.event.number }}-driver \
--set branch=${{ github.ref_name }} \
--set name=pr-${{ github.event.number }}-driver \
-f - \
-o yaml \
< ${GITHUB_WORKSPACE}/.signadot/driver-template.yaml \
Expand Down
3 changes: 2 additions & 1 deletion .signadot/customer-template.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: "@{git-branch}"
name: "@{name}"
spec:
description: sandbox for customer service
cluster: demo
labels:
signadot/github-repo: "signadot/hotrod"
signadot/github-pull-request: "@{github-pr}"
branch: "@{branch}"
forks:
- forkOf:
kind: Deployment
Expand Down
3 changes: 2 additions & 1 deletion .signadot/driver-template.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: "@{git-branch}"
name: "@{name}"
spec:
description: sandbox for driver service
cluster: demo
labels:
signadot/github-repo: "signadot/hotrod"
signadot/github-pull-request: "@{github-pr}"
branch: "@{branch}"
forks:
- forkOf:
kind: Deployment
Expand Down
3 changes: 2 additions & 1 deletion .signadot/frontend-template.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: "@{git-branch}"
name: "@{name}"
spec:
description: sandbox for frontend service
cluster: demo
labels:
signadot/github-repo: "signadot/hotrod"
signadot/github-pull-request: "@{github-pr}"
branch: "@{branch}"
forks:
- forkOf:
kind: Deployment
Expand Down
3 changes: 2 additions & 1 deletion .signadot/route-template.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
name: "@{git-branch}"
name: "@{name}"
spec:
description: sandbox for route service
cluster: demo
labels:
signadot/github-repo: "signadot/hotrod"
signadot/github-pull-request: "@{github-pr}"
branch: "@{branch}"
forks:
- forkOf:
kind: Deployment
Expand Down

0 comments on commit 99826bf

Please sign in to comment.