From 6a7dc561ed8b97990367bd9d44a0a13a3ea7b8f2 Mon Sep 17 00:00:00 2001 From: Daniel Bodky Date: Mon, 10 Jun 2024 16:00:39 +0200 Subject: [PATCH] Update action to use newest stable CLI version by default --- publish-workshop/README.md | 1 + publish-workshop/action.yaml | 10 +++++++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/publish-workshop/README.md b/publish-workshop/README.md index 1488c8f..b0c44c7 100644 --- a/publish-workshop/README.md +++ b/publish-workshop/README.md @@ -105,3 +105,4 @@ GitHub action are as follows: | `token` | True | String | GitHub access token. Must be set to `${{secrets.GITHUB_TOKEN}}` or appropriate personal access token variable reference. | | `trainingportal-resource-file` | False | String | Relative path under workshop directory to the `TrainingPortal` resource file. Defaults to "`resources/trainingportal.yaml`". | | `workshop-resource-file` | False | String | Relative path under workshop directory to the `Workshop` resource file. Defaults to "`resources/workshop.yaml`". | +| `educates-version` | False | String | Version of the Educates CLI to be used within the Action. Defaults to "`2.7.1`". | diff --git a/publish-workshop/action.yaml b/publish-workshop/action.yaml index dff0927..61b12e7 100644 --- a/publish-workshop/action.yaml +++ b/publish-workshop/action.yaml @@ -17,6 +17,10 @@ inputs: description: "Relative path under workshop directory to the TrainingPortal resource file." required: false default: 'resources/trainingportal.yaml' + educates-version: + description: "Version of the Educates CLI to be used within the Action" + required: false + default: '2.7.1' runs: using: composite @@ -29,9 +33,9 @@ runs: - name: Install Educates CLI shell: bash run: | - # curl -Lo /usr/local/bin/educates https://github.com/vmware-tanzu-labs/educates-training-platform/releases/download/2.6.0/educates-linux-amd64 + # curl -Lo /usr/local/bin/educates https://github.com/vmware-tanzu-labs/educates-training-platform/releases/download/${{inputs.educates-version}}/educates-linux-amd64 # chmod +x /usr/local/bin/educates - imgpkg pull -i ghcr.io/vmware-tanzu-labs/educates-client-programs:2.6.0 -o /tmp/client-programs + imgpkg pull -i ghcr.io/vmware-tanzu-labs/educates-client-programs:${{inputs.educates-version}} -o /tmp/client-programs mv /tmp/client-programs/educates-linux-amd64 /usr/local/bin/educates - name: Calculate release variables @@ -45,7 +49,7 @@ runs: - name: Publish workshop and create workshop definition shell: bash - run : | + run: | mkdir -p ${{runner.temp}}/workshops/${REPOSITORY_NAME}/resources educates publish-workshop '${{inputs.path}}' \ --workshop-file '${{inputs.workshop-resource-file}}' \