File tree Expand file tree Collapse file tree 1 file changed +12
-4
lines changed
Expand file tree Collapse file tree 1 file changed +12
-4
lines changed Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ name: Build nightwatch tests
2020# secrets: inherit
2121# with:
2222# versions: smoketest/k8s/versions
23+ # k8s_base: smoketest/k8s
2324# project: MYPROJECT
2425# environment: staging
2526# gke_cluster: my-cluster
3132 required : false
3233 type : string
3334 environment :
34- required : true
35+ required : false
3536 type : string
37+ default : staging
3638 gke_cluster :
37- required : true
39+ required : false
3840 type : string
3941 args :
4042 required : false
4648 "secretRef": {"name": "nightwatch-secrets", "optional": true}}]}
4749 ]'
4850 versions :
51+ description : directory in which to run `kustomize edit set-image`
52+ required : false
53+ type : string
54+ k8s_base :
55+ description : directory that contains a k8s manifest containing the final image name
4956 required : false
5057 type : string
58+ default : k8s
5159 outputs :
5260 tag :
5361 description : " Tag of built 'nightwatch' image"
7886 default="${repository##*/}"
7987 project="${input:-$default}"
8088 echo "project=$project" >> "$GITHUB_ENV"
81- echo "image=${{ vars.GAR_DOCKER_REGISTRY }}/$project-nightwatch " >> "$GITHUB_ENV"
89+ echo "image=$( kustomize build ${{inputs.k8s_base}}/${{ inputs.environment }} | awk -F: '/image: .*nightwatch/ { print $2 }' | tr -d ' ' ) " >> "$GITHUB_ENV"
8290 echo "tag=${{ steps.tag.outputs.tag }}" >> "$GITHUB_ENV"
8391 - name : Setup auth
8492 uses : ZeitOnline/gh-action-baseproject@v0
8795 project_name : ${{ env.project }}
8896 environment : ${{ inputs.environment }}
8997 gke_auth : true
90- gke_cluster : ${{ inputs.gke_cluster }}
98+ gke_cluster : ${{ inputs.gke_cluster || inputs.environment }}
9199 google_auth : true
92100 gar_docker_auth : true
93101 vault_export_token : true
You can’t perform that action at this time.
0 commit comments