File tree 2 files changed +20
-7
lines changed
2 files changed +20
-7
lines changed Original file line number Diff line number Diff line change 19
19
push :
20
20
branches :
21
21
- main
22
- - ' develop* *'
22
+ - ' *'
23
23
workflow_dispatch :
24
24
inputs :
25
25
push-to-dev :
@@ -118,6 +118,9 @@ jobs:
118
118
if : ${{ github.event.inputs.upload-docs == 'true' }}
119
119
with :
120
120
image_tag : ' yesdk-docserver'
121
+ registry_url : ' us-docker.pkg.dev'
122
+ project_id : ' support-cluster-769001'
123
+ repository_name : ' yesdk'
121
124
needs : build
122
125
123
126
publish-internal :
Original file line number Diff line number Diff line change 12
12
# See the License for the specific language governing permissions and
13
13
# limitations under the License.
14
14
15
- name : Upload documentation
15
+ name : Upload Documentation to GCP
16
16
17
17
on :
18
18
workflow_call :
19
19
inputs :
20
20
image_tag :
21
21
required : true
22
22
type : string
23
+ registry_url :
24
+ required : true
25
+ type : string
26
+ project_id :
27
+ required : true
28
+ type : string
29
+ repository_name :
30
+ required : true
31
+ type : string
23
32
24
33
jobs :
25
34
upload_docs :
26
35
runs-on : ubuntu-latest
27
36
steps :
37
+ - uses : actions/checkout@v4
28
38
- uses : actions/download-artifact@v4
29
39
with :
30
40
name : Documentation
31
41
path : Yubico.YubiKey/docs/_site/
32
- - name : Docker build nginx webserver
42
+ - name : Docker build
33
43
run : |
34
44
docker build -t "${{ inputs.image_tag }}:${{ github.sha }}" .
35
45
- name : Authenticate to GCP
36
46
uses : google-github-actions/auth@v2
37
47
with :
38
- workload_identity_provider : ${{ vars.GLOBAL_GCP_WORKLOAD_IDENTITY_PROVIDER }}
48
+ workload_identity_provider : ${{ vars.GLOBAL_GCP_WORKLOAD_IDENTITY_PROVIDER }} # Provided at organizational level
39
49
service_account :
[email protected]
40
50
- name : Push Docker image to GCP
41
51
run : |
42
- gcloud auth configure-docker ${{ env.IMAGE_REGISTRY_URL }} --project ${{ env.IMAGE_REGISTRY_PROJECT }}
43
- docker tag "${{ inputs.image_tag }}:${{ github.sha }}" "${{ env.IMAGE_REGISTRY_URL }}/${{ env.IMAGE_REGISTRY_PROJECT }}/${{ env.IMAGE_REPOSITORY }}/${{ inputs.image_tag }}:${{ github.sha }}"
44
- docker push "${{ env.IMAGE_REGISTRY_URL }}/${{ env.IMAGE_REGISTRY_PROJECT }}/${{ env.IMAGE_REPOSITORY }}/${{ inputs.image_tag }}:${{ github.sha }}"
52
+ gcloud auth configure-docker ${{ inputs.registry_url }} --project ${{ inputs.project_id }}
53
+ docker tag "${{ inputs.image_tag }}:${{ github.sha }}" "${{ inputs.registry_url }}/${{ inputs.project_id }}/${{ inputs.repository_name }}/${{ inputs.image_tag }}:${{ github.sha }}"
54
+ docker push "${{ inputs.registry_url }}/${{ inputs.project_id }}/${{ inputs.repository_name }}/${{ inputs.image_tag }}:${{ github.sha }}"
You can’t perform that action at this time.
0 commit comments