-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Set the values file by target environment
If the branch name is: - test - starts with test- - ends in -test - has *-test/* - has */test-* then test If the branch name is: - main then prod Otherwise: stage
- Loading branch information
Showing
2 changed files
with
14 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,11 +20,14 @@ jobs: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | ||
password: ${{ secrets.DOCKERHUB_TOKEN }} | ||
|
||
- name: Set the K8S Environment | ||
run: echo "K8S_DEPLOY_ENVIRONMENT=$($GITHUB_WORKSPACE/.github/workflows/get-k8s-environment.sh)" >> "$GITHUB_ENV" | ||
|
||
- name: Read chart yaml to get version for docker tag | ||
id: image-tag | ||
uses: KJ002/[email protected] | ||
with: | ||
file: 'charts/prod-oralhistory-values.yaml' | ||
file: 'charts/${{ env.K8S_DEPLOY_ENVIRONMENT }}-oralhistory-values.yaml' | ||
key-path: '["image", "tag"]' | ||
|
||
- name: Report image tag | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
case "$GITHUB_REF" in | ||
test | test-* | */test | */test-* | *-test/* | *-test) | ||
echo test ;; | ||
main) | ||
echo prod ;; | ||
*) | ||
echo stage ;; | ||
esac |