18
18
19
19
steps :
20
20
- name : Checkout code
21
- uses : actions/checkout@v4
21
+ uses : actions/checkout@v3
22
22
23
- - name : Install Carvel tools
24
- shell : bash
25
- run : curl -L https://carvel.dev/install.sh | bash
26
-
27
- - name : Install Educates CLI
28
- shell : bash
29
- run : |
30
- imgpkg pull -i ghcr.io/vmware-tanzu-labs/educates-client-programs:2.7.2 -o /tmp/client-programs
31
- mv /tmp/client-programs/educates-linux-amd64 /usr/local/bin/educates
32
-
33
- - name : Setup repository variables and release details
34
- shell : bash
35
- run : |
36
- REPOSITORY_NAME=${{github.event.repository.name}}
37
- echo "REPOSITORY_NAME=${REPOSITORY_NAME,,}" >>${GITHUB_ENV}
38
- echo "REPOSITORY_OWNER=${GITHUB_REPOSITORY_OWNER,,}" >>${GITHUB_ENV}
39
- echo "REPOSITORY_TAG=${GITHUB_REF##*/}" >>${GITHUB_ENV}
40
-
41
- - name : Publish workshops and create workshop definitions
42
- shell : bash
43
- run : |
44
- for WORKSHOP_DIRECTORY in workshops/*; do
45
- mkdir -p ${{runner.temp}}/${WORKSHOP_DIRECTORY}/resources
46
- educates publish-workshop ${WORKSHOP_DIRECTORY} \
47
- --export-workshop ${{runner.temp}}/${WORKSHOP_DIRECTORY}/resources/workshop.yaml \
48
- --image-repository=ghcr.io/${REPOSITORY_OWNER} \
49
- --workshop-version=${REPOSITORY_TAG} \
50
- --registry-username=${{github.actor}} \
51
- --registry-password=${{secrets.GITHUB_TOKEN}}
52
- done
53
-
54
- - name : Generate archives containing the workshop definitions
55
- shell : bash
56
- run : |
57
- ytt -f ${{runner.temp}}/workshops > ${{runner.temp}}/workshops.yaml
58
- (cd ${{runner.temp}}; tar cvfz workshops.tar.gz workshops)
59
- (cd ${{runner.temp}}; zip workshops.zip -r workshops)
60
-
61
- - name : Create the GitHub release for the workshops
62
- id : create_release
63
- uses : softprops/action-gh-release@v1
64
- env :
65
- GITHUB_TOKEN : ${{secrets.GITHUB_TOKEN}}
23
+ - name : Create release
24
+ uses : educates/educates-github-actions/publish-multiple-workshops@v7
66
25
with :
67
- tag_name : ${{env.REPOSITORY_TAG}}
68
- name : ${{env.REPOSITORY_NAME}}:${{env.REPOSITORY_TAG}}
69
- draft : false
70
- prerelease : false
71
- files : |
72
- ${{runner.temp}}/workshops.tar.gz
73
- ${{runner.temp}}/workshops.zip
74
- ${{runner.temp}}/workshops.yaml
75
- resources/trainingportal.yaml
26
+ token : ${{secrets.GITHUB_TOKEN}}
0 commit comments