From 43a7176f802124fcac9b9f5f7ca260338246db16 Mon Sep 17 00:00:00 2001 From: michaeljguarino Date: Thu, 10 Aug 2023 12:16:33 -0400 Subject: [PATCH] Add cloud shell image CD Use the upgrade command to auto-deploy new cloud shell image configuration on new version publish --- .github/workflows/goreleaser-cd.yml | 13 +++++++++++++ upgrade.yaml | 7 +++++++ 2 files changed, 20 insertions(+) create mode 100644 upgrade.yaml diff --git a/.github/workflows/goreleaser-cd.yml b/.github/workflows/goreleaser-cd.yml index d8679ff7..7104a2ed 100644 --- a/.github/workflows/goreleaser-cd.yml +++ b/.github/workflows/goreleaser-cd.yml @@ -233,3 +233,16 @@ jobs: uses: github/codeql-action/upload-sarif@v2 with: sarif_file: 'trivy-results.sarif' + push: + runs-on: ubuntu-latest + needs: publish + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: installing plural + uses: pluralsh/setup-plural@v0.1.5 + with: + config: ${{ secrets.PLURAL_CONF }} + vsn: 0.6.28 + - name: deploy to plural + run: cat upgrade.yaml | REF_NAME=${GITHUB_REF_NAME#v} envsubst | plural upgrade plural plural -f - diff --git a/upgrade.yaml b/upgrade.yaml new file mode 100644 index 00000000..e7d12a2b --- /dev/null +++ b/upgrade.yaml @@ -0,0 +1,7 @@ +message: updating cloud shell image to $GITHUB_REF_NAME +type: CONFIG +config: + paths: + - path: .plural.secrets.cloud_shell_img + value: ghcr.io/pluralsh/plural-cli-cloud:${REF_NAME} + type: STRING