Skip to content

Commit 7e8cea0

Browse files
authored
Feature/add workflow output
1 parent 0a26ac1 commit 7e8cea0

File tree

8 files changed

+31
-21
lines changed

8 files changed

+31
-21
lines changed

.github/workflows/create-image.yml

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
githubRepo:
77
description: "Link of public github repo to deploy"
88
required: true
9+
outputs:
10+
student_url:
11+
description: "Link of student's repository"
12+
value: ${{ jobs.get_students_url.outputs.student_url }}
913

1014
jobs:
1115
create_student_submodule:
@@ -88,3 +92,9 @@ jobs:
8892
repo_name: ${{ needs.dockerise-image.outputs.repo_name }}
8993
year: ${{ needs.dockerise-image.outputs.year }}
9094
image: ${{ needs.dockerise-image.outputs.image_name }}
95+
96+
get_students_url:
97+
runs-on: ubuntu-latest
98+
needs: trigger_deployment
99+
outputs:
100+
student_url: ${{ needs.trigger_deployment.outputs.student_url }}

.github/workflows/deploy-image.yml

+11-7
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,10 @@ on:
1919
description: "image name"
2020
required: true
2121
type: string
22+
outputs:
23+
student_url:
24+
description: "student's deployment url"
25+
value: ${{ jobs.deploy-with-helm.outputs.students_url }}
2226

2327
jobs:
2428
create-or-update-values-file:
@@ -92,16 +96,16 @@ jobs:
9296
steps:
9397
- name: Checkout
9498
uses: actions/checkout@v4
95-
- id: 'auth'
96-
name: 'Authenticate to Google Cloud'
97-
uses: 'google-github-actions/auth@v2'
99+
- id: "auth"
100+
name: "Authenticate to Google Cloud"
101+
uses: "google-github-actions/auth@v2"
98102
with:
99103
create_credentials_file: true
100-
workload_identity_provider: 'projects/1006240973223/locations/global/workloadIdentityPools/gha-create-gke-cluster/providers/github-actions'
101-
service_account: '[email protected]'
102-
- id: 'get-credentials'
104+
workload_identity_provider: "projects/1006240973223/locations/global/workloadIdentityPools/gha-create-gke-cluster/providers/github-actions"
105+
service_account: "[email protected]"
106+
- id: "get-credentials"
103107
name: Get GKE creds
104-
uses: 'google-github-actions/get-gke-credentials@v2'
108+
uses: "google-github-actions/get-gke-credentials@v2"
105109
with:
106110
cluster_name: code-idp-gke
107111
location: europe-west1

.github/workflows/update-image.yml

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ on:
66
githubRepo:
77
description: "Link of public github repo to deploy"
88
required: true
9+
outputs:
10+
student_url:
11+
description: "student's deployment url"
12+
value: ${{ jobs.deploy-with-helm.outputs.students_url }}
913

1014
jobs:
1115
check_if_update_needed:
@@ -97,3 +101,9 @@ jobs:
97101
repo_name: ${{ needs.dockerise-image.outputs.repo_name }}
98102
year: ${{ needs.dockerise-image.outputs.year }}
99103
image: ${{ needs.dockerise-image.outputs.image_name }}
104+
105+
get_students_url:
106+
runs-on: ubuntu-latest
107+
needs: trigger_deployment
108+
outputs:
109+
student_url: ${{ needs.trigger_deployment.outputs.student_url }}

.gitmodules

-6
This file was deleted.
This file was deleted.

submissions-2024/maggieekubat-recipe/values.yml

-3
This file was deleted.

submissions-2024/noemiamccarthy-web-basics-hand-in-04/values.yml

-3
This file was deleted.

0 commit comments

Comments
 (0)