Skip to content

Commit

Permalink
fix sandbox action (#735)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amper authored Aug 25, 2023
1 parent f28d05b commit 8f741e7
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 8f741e7

Please sign in to comment.