-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updates to have proper versioned workshops
- Loading branch information
1 parent
b2f06b7
commit d0f5528
Showing
51 changed files
with
776 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
name: Publish Workshops | ||
|
||
on: | ||
push: | ||
tags: | ||
- "[0-9]+.[0-9]+" | ||
- "[0-9]+.[0-9]+-alpha.[0-9]+" | ||
- "[0-9]+.[0-9]+-beta.[0-9]+" | ||
- "[0-9]+.[0-9]+-rc.[0-9]+" | ||
branches: | ||
- main | ||
- develop | ||
workflow_dispatch: | ||
|
||
jobs: | ||
publish-workshops: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install Carvel tools | ||
shell: bash | ||
run: curl -L https://carvel.dev/install.sh | bash | ||
|
||
- 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.7.2/educates-linux-amd64 | ||
# chmod +x /usr/local/bin/educates | ||
imgpkg pull -i ghcr.io/vmware-tanzu-labs/educates-client-programs:2.7.2 -o /tmp/client-programs | ||
mv /tmp/client-programs/educates-linux-amd64 /usr/local/bin/educates | ||
- name: Setup repository variables and release details | ||
shell: bash | ||
run: | | ||
REPOSITORY_NAME=${{github.event.repository.name}} | ||
echo "REPOSITORY_NAME=${REPOSITORY_NAME,,}" >>${GITHUB_ENV} | ||
echo "REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV} | ||
echo "REPOSITORY_TAG=${GITHUB_REF##*/}" >>${GITHUB_ENV} | ||
- name: Publish workshops and create workshop definitions for bundle-colours | ||
shell: bash | ||
run: | | ||
for WORKSHOP_DIRECTORY in workshops/bundle-colours/*; do | ||
mkdir -p ${{runner.temp}}/${WORKSHOP_DIRECTORY}/resources | ||
educates publish-workshop ${WORKSHOP_DIRECTORY} \ | ||
--export-workshop ${{runner.temp}}/${WORKSHOP_DIRECTORY}/resources/workshop.yaml \ | ||
--image-repository=ghcr.io/${REPOSITORY_OWNER} \ | ||
--workshop-version=${REPOSITORY_TAG} \ | ||
--registry-username=${{github.actor}} \ | ||
--registry-password=${{secrets.GITHUB_TOKEN}} | ||
done | ||
- name: Publish workshops and create workshop definitions for bundle-animals | ||
shell: bash | ||
run: | | ||
for WORKSHOP_DIRECTORY in workshops/bundle-animals/*; do | ||
mkdir -p ${{runner.temp}}/${WORKSHOP_DIRECTORY}/resources/ | ||
educates publish-workshop ${WORKSHOP_DIRECTORY} \ | ||
--export-workshop ${{runner.temp}}/${WORKSHOP_DIRECTORY}/resources/workshop.yaml \ | ||
--image-repository=ghcr.io/${REPOSITORY_OWNER} \ | ||
--workshop-version=${REPOSITORY_TAG} \ | ||
--registry-username=${{github.actor}} \ | ||
--registry-password=${{secrets.GITHUB_TOKEN}} | ||
done | ||
- name: Generate archives containing the workshop definitions | ||
shell: bash | ||
run: | | ||
ytt -f ${{runner.temp}}/workshops > ${{runner.temp}}/workshops-all.yaml | ||
(cd ${{runner.temp}}; tar cvfz workshops-all.tar.gz workshops) | ||
(cd ${{runner.temp}}; zip workshops-all.zip -r workshops) | ||
ytt -f ${{runner.temp}}/workshops/bundle-colours > ${{runner.temp}}/workshops-colours.yaml | ||
(cd ${{runner.temp}}; tar cvfz workshops-colours.tar.gz workshops/bundle-colours) | ||
(cd ${{runner.temp}}; zip workshops-colours.zip -r workshops/bundle-colours) | ||
ytt -f ${{runner.temp}}/workshops/bundle-animals > ${{runner.temp}}/workshops-animals.yaml | ||
(cd ${{runner.temp}}; tar cvfz workshops-animals.tar.gz workshops/bundle-animals) | ||
(cd ${{runner.temp}}; zip workshops-animals.zip -r workshops/bundle-animals) | ||
- name: Create the GitHub release for the workshops | ||
id: create_release | ||
uses: softprops/action-gh-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} | ||
with: | ||
tag_name: ${{env.REPOSITORY_TAG}} | ||
name: ${{env.REPOSITORY_NAME}}:${{env.REPOSITORY_TAG}} | ||
draft: false | ||
prerelease: false | ||
files: | | ||
${{runner.temp}}/workshops.tar.gz | ||
${{runner.temp}}/workshops.zip | ||
${{runner.temp}}/workshops-all.yaml | ||
${{runner.temp}}/workshops-colours.yaml | ||
${{runner.temp}}/workshops-animals.yaml | ||
resources/trainingportal.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Workshop | ||
|
||
Workshop description |
34 changes: 34 additions & 0 deletions
34
workshops/bundle-animals/workshop-bird/resources/workshop.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: training.educates.dev/v1beta1 | ||
kind: Workshop | ||
metadata: | ||
name: "workshop-bird" | ||
spec: | ||
title: "Workshop" | ||
description: "Workshop description." | ||
publish: | ||
image: "$(image_repository)/workshop-bird-files:$(workshop_version)" | ||
workshop: | ||
files: | ||
- image: | ||
url: "$(image_repository)/workshop-bird-files:$(workshop_version)" | ||
includePaths: | ||
- /workshop/** | ||
- /exercises/** | ||
- /README.md | ||
session: | ||
namespaces: | ||
budget: medium | ||
applications: | ||
terminal: | ||
enabled: true | ||
layout: split | ||
editor: | ||
enabled: true | ||
console: | ||
enabled: false | ||
docker: | ||
enabled: false | ||
registry: | ||
enabled: false | ||
vcluster: | ||
enabled: false |
31 changes: 31 additions & 0 deletions
31
workshops/bundle-animals/workshop-bird/workshop/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# pathways: | ||
# default: workshop | ||
# | ||
# paths: | ||
# workshop: | ||
# title: "Workshop" | ||
# | ||
# steps: | ||
# - 00-workshop-overview | ||
# - 01-workshop-instructions | ||
# - 99-workshop-summary | ||
# | ||
# params: | ||
# - name: NAME | ||
# value: undefined | ||
# aliases: | ||
# - ALIAS | ||
|
||
# modules: | ||
# - name: 00-workshop-overview | ||
# title: Workshop Overview | ||
# - name: 01-workshop-instructions | ||
# title: Workshop Instructions | ||
# - name: 99-workshop-summary | ||
# title: Workshop Summary | ||
|
||
# params: | ||
# - name: NAME | ||
# value: undefined | ||
# aliases: | ||
# - ALIAS |
5 changes: 5 additions & 0 deletions
5
workshops/bundle-animals/workshop-bird/workshop/content/00-workshop-overview.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Workshop Overview | ||
--- | ||
|
||
This is the initial landing page for your workshop. Include in this page a description of what your workshop is about. |
5 changes: 5 additions & 0 deletions
5
...shops/bundle-animals/workshop-bird/workshop/content/01-workshop-instructions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Workshop Instructions | ||
--- | ||
|
||
This is the first page of the workshop instructions, create as many separate pages as you need to. If necessary pages can be located in sub directories to provided grouping. |
5 changes: 5 additions & 0 deletions
5
workshops/bundle-animals/workshop-bird/workshop/content/99-workshop-summary.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Workshop Summary | ||
--- | ||
|
||
This is the last page of the workshop. Include in this page a summary of the workshop and any links to resources relevant to the workshop. This ensures anyone doing the workshop has material they can research later to learn more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Workshop | ||
|
||
Workshop description |
34 changes: 34 additions & 0 deletions
34
workshops/bundle-animals/workshop-cat/resources/workshop.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: training.educates.dev/v1beta1 | ||
kind: Workshop | ||
metadata: | ||
name: "workshop-cat" | ||
spec: | ||
title: "Workshop" | ||
description: "Workshop description." | ||
publish: | ||
image: "$(image_repository)/workshop-cat-files:$(workshop_version)" | ||
workshop: | ||
files: | ||
- image: | ||
url: "$(image_repository)/workshop-cat-files:$(workshop_version)" | ||
includePaths: | ||
- /workshop/** | ||
- /exercises/** | ||
- /README.md | ||
session: | ||
namespaces: | ||
budget: medium | ||
applications: | ||
terminal: | ||
enabled: true | ||
layout: split | ||
editor: | ||
enabled: true | ||
console: | ||
enabled: false | ||
docker: | ||
enabled: false | ||
registry: | ||
enabled: false | ||
vcluster: | ||
enabled: false |
31 changes: 31 additions & 0 deletions
31
workshops/bundle-animals/workshop-cat/workshop/config.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# pathways: | ||
# default: workshop | ||
# | ||
# paths: | ||
# workshop: | ||
# title: "Workshop" | ||
# | ||
# steps: | ||
# - 00-workshop-overview | ||
# - 01-workshop-instructions | ||
# - 99-workshop-summary | ||
# | ||
# params: | ||
# - name: NAME | ||
# value: undefined | ||
# aliases: | ||
# - ALIAS | ||
|
||
# modules: | ||
# - name: 00-workshop-overview | ||
# title: Workshop Overview | ||
# - name: 01-workshop-instructions | ||
# title: Workshop Instructions | ||
# - name: 99-workshop-summary | ||
# title: Workshop Summary | ||
|
||
# params: | ||
# - name: NAME | ||
# value: undefined | ||
# aliases: | ||
# - ALIAS |
5 changes: 5 additions & 0 deletions
5
workshops/bundle-animals/workshop-cat/workshop/content/00-workshop-overview.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Workshop Overview | ||
--- | ||
|
||
This is the initial landing page for your workshop. Include in this page a description of what your workshop is about. |
5 changes: 5 additions & 0 deletions
5
workshops/bundle-animals/workshop-cat/workshop/content/01-workshop-instructions.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Workshop Instructions | ||
--- | ||
|
||
This is the first page of the workshop instructions, create as many separate pages as you need to. If necessary pages can be located in sub directories to provided grouping. |
5 changes: 5 additions & 0 deletions
5
workshops/bundle-animals/workshop-cat/workshop/content/99-workshop-summary.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
title: Workshop Summary | ||
--- | ||
|
||
This is the last page of the workshop. Include in this page a summary of the workshop and any links to resources relevant to the workshop. This ensures anyone doing the workshop has material they can research later to learn more. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Workshop | ||
|
||
Workshop description |
34 changes: 34 additions & 0 deletions
34
workshops/bundle-animals/workshop-dog/resources/workshop.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
apiVersion: training.educates.dev/v1beta1 | ||
kind: Workshop | ||
metadata: | ||
name: "workshop-dog" | ||
spec: | ||
title: "Workshop" | ||
description: "Workshop description." | ||
publish: | ||
image: "$(image_repository)/workshop-dog-files:$(workshop_version)" | ||
workshop: | ||
files: | ||
- image: | ||
url: "$(image_repository)/workshop-dog-files:$(workshop_version)" | ||
includePaths: | ||
- /workshop/** | ||
- /exercises/** | ||
- /README.md | ||
session: | ||
namespaces: | ||
budget: medium | ||
applications: | ||
terminal: | ||
enabled: true | ||
layout: split | ||
editor: | ||
enabled: true | ||
console: | ||
enabled: false | ||
docker: | ||
enabled: false | ||
registry: | ||
enabled: false | ||
vcluster: | ||
enabled: false |
Oops, something went wrong.