Skip to content

Commit

Permalink
fix sandbox action
Browse files Browse the repository at this point in the history
  • Loading branch information
Amper committed Aug 25, 2023
1 parent f28d05b commit 7e085d0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/sandbox.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
name: Update version on sandbox

on:
push:
branches:
- 'master'
workflow_run:
workflows: ["Build and Test"]
branches: ["master"]
types:
- completed

jobs:
update:
Expand Down Expand Up @@ -33,7 +35,7 @@ jobs:
export VM_GIT_COMMIT_SHA="$(git rev-parse --short $GITHUB_SHA)"
export VM_SANDBOX_OPERATOR_PATH="gcp-test/sandbox/manifests/applications/vm-operator.yaml"
git checkout -b "${VM_GIT_BRANCH_NAME}"
yq -i 'with(.spec.source.helm.values; . = (. | from_yaml | .image.tag = $VM_GIT_COMMIT_SHA | to_yaml))' $VM_SANDBOX_OPERATOR_PATH
yq -i 'with(.spec.source.helm.values; . = (. | from_yaml | .image.tag = strenv(VM_GIT_COMMIT_SHA) | to_yaml))' $VM_SANDBOX_OPERATOR_PATH
git add $VM_SANDBOX_OPERATOR_PATH
git commit -S -m "Automatic update operator version on sandbox from ${GITHUB_REPOSITORY}@${VM_GIT_COMMIT_SHA}"
git push origin ${VM_GIT_BRANCH_NAME}
Expand Down

0 comments on commit 7e085d0

Please sign in to comment.