diff --git a/.github/workflows/build_and_push.yaml b/.github/workflows/build_and_push.yaml index 2d294c8..a48e27f 100644 --- a/.github/workflows/build_and_push.yaml +++ b/.github/workflows/build_and_push.yaml @@ -18,7 +18,7 @@ jobs: - uses: actions/checkout@v3 - name: Authenticate to Google Cloud id: auth - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: workload_identity_provider: projects/331888282073/locations/global/workloadIdentityPools/push-to-gcr-pool/providers/gh-action service_account: push-to-gcr-storage-object-adm@pro-chesta.iam.gserviceaccount.com @@ -26,7 +26,7 @@ jobs: uses: ./ # uses: RafikFarhad/push-to-gcr-github-action@v5-rc1 # <- use this on your workflow with: - # gcloud_service_key: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} # <- not needed when used with google-github-actions/auth@v0 + # gcloud_service_key: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} # <- not needed when used with google-github-actions/auth@v2 registry: gcr.io project_id: pro-chesta image_name: hello-world-by-push-to-gcr-0 @@ -42,14 +42,14 @@ jobs: - uses: actions/checkout@v3 - name: Authenticate to Google Cloud id: auth - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: '${{ secrets.B64_GCLOUD_SERVICE_ACCOUNT_JSON }}' - name: Building and pushing the image uses: ./ # uses: RafikFarhad/push-to-gcr-github-action@v5-rc1 # <- use this on your workflow with: - # gcloud_service_key: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} # <- not needed when used with google-github-actions/auth@v0 + # gcloud_service_key: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} # <- not needed when used with google-github-actions/auth@v2 registry: gcr.io project_id: pro-chesta image_name: hello-world-by-push-to-gcr-1 @@ -91,15 +91,15 @@ jobs: # this step mimics your build step which produce a docker image that will be pushed to gcr - name: Authenticate to Google Cloud id: auth - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: workload_identity_provider: projects/331888282073/locations/global/workloadIdentityPools/push-to-gcr-pool/providers/gh-action service_account: push-to-gcr-storage-object-adm@pro-chesta.iam.gserviceaccount.com - - name: Building and pushing the image + - name: Pushing the image uses: ./ # uses: RafikFarhad/push-to-gcr-github-action@v5-rc1 # <- use this on your workflow with: - # gcloud_service_key: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} # <- not needed when used with google-github-actions/auth@v0 + # gcloud_service_key: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} # <- not needed when used with google-github-actions/auth@v2 registry: gcr.io project_id: pro-chesta image_name: hello-world-by-push-to-gcr-3 @@ -121,7 +121,7 @@ jobs: type: [0, 1, 2] steps: - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} - name: Testing the image @@ -141,7 +141,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Authenticate to Google Cloud - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: credentials_json: ${{ secrets.JSON_GCLOUD_SERVICE_ACCOUNT_JSON }} - name: Delete images diff --git a/ReadMe.md b/ReadMe.md index 265de4d..a78fc18 100644 --- a/ReadMe.md +++ b/ReadMe.md @@ -73,7 +73,7 @@ jobs: - uses: actions/checkout@v3 - name: Authenticate to Google Cloud id: auth - uses: google-github-actions/auth@v0 + uses: google-github-actions/auth@v2 with: workload_identity_provider: projects/123123123/locations/global/workloadIdentityPools/the-workload-pool/providers/the-provider service_account: only-storage-object-adm@.iam.gserviceaccount.com