Skip to content

Commit 52860ef

Browse files
committed
fix: use correct Cloud Run Jobs trigger API URI and OAuth token for Cloud Scheduler
1 parent 7c8a0b8 commit 52860ef

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

.github/workflows/google-cloudrun-docker.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,16 @@ jobs:
133133
gcloud scheduler jobs update http ${{ env.JOB_NAME }} \
134134
--location=${{ env.PROJECT_REGION }} \
135135
--schedule="* * * * *" \
136-
--uri="https://${{ env.PROJECT_REGION }}-run.googleapis.com/v2/projects/${{ env.PROJECT_ID }}/locations/${{ env.PROJECT_REGION }}/jobs/${{ env.JOB_NAME }}:run" \
136+
--uri="https://${{ env.PROJECT_REGION }}-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/${{ env.PROJECT_ID }}/jobs/${{ env.JOB_NAME }}:run" \
137137
--http-method=POST \
138-
--oidc-service-account-email=${{ vars.GCP_SA_EMAIL }}
138+
--oauth-service-account-email=${{ vars.GCP_SA_EMAIL }}
139139
else
140140
echo "Creating new Cloud Scheduler job"
141141
gcloud scheduler jobs create http ${{ env.JOB_NAME }} \
142142
--location=${{ env.PROJECT_REGION }} \
143143
--schedule="* * * * *" \
144144
--time-zone="America/Argentina/Buenos_Aires" \
145-
--uri="https://${{ env.PROJECT_REGION }}-run.googleapis.com/v2/projects/${{ env.PROJECT_ID }}/locations/${{ env.PROJECT_REGION }}/jobs/${{ env.JOB_NAME }}:run" \
145+
--uri="https://${{ env.PROJECT_REGION }}-run.googleapis.com/apis/run.googleapis.com/v1/namespaces/${{ env.PROJECT_ID }}/jobs/${{ env.JOB_NAME }}:run" \
146146
--http-method=POST \
147-
--oidc-service-account-email=${{ vars.GCP_SA_EMAIL }}
147+
--oauth-service-account-email=${{ vars.GCP_SA_EMAIL }}
148148
fi

0 commit comments

Comments
 (0)