Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update action to use newest stable CLI version (2.7.1) by default #5

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions publish-workshop/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`". |
10 changes: 7 additions & 3 deletions publish-workshop/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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}}' \
Expand Down