-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DCJ-516: Use Workload Identity (#2629)
- Loading branch information
Showing
2 changed files
with
13 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,9 @@ jobs: | |
runs-on: ubuntu-latest | ||
outputs: | ||
sherlock-version: ${{ steps.short-sha.outputs.sha }} | ||
permissions: | ||
contents: 'read' | ||
id-token: 'write' | ||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
@@ -44,17 +47,18 @@ jobs: | |
. | ||
- name: Log Github Actor | ||
run: echo "${{ github.actor }}" | ||
- name: Auth to GCR | ||
- id: 'auth' | ||
if: github.actor != 'dependabot[bot]' | ||
name: 'Authenticate to Google Cloud' | ||
uses: 'google-github-actions/auth@v2' | ||
with: | ||
credentials_json: ${{ secrets.GCR_PUBLISH_KEY_B64 }} | ||
- name: Auth Docker for GCR | ||
if: github.actor != 'dependabot[bot]' | ||
run: gcloud auth configure-docker --quiet | ||
# Centralized in dsp-tools-k8s; ask in #dsp-devops-champions for help troubleshooting | ||
workload_identity_provider: 'projects/1038484894585/locations/global/workloadIdentityPools/github-wi-pool/providers/github-wi-provider' | ||
service_account: '[email protected]' | ||
- name: Push Image to GCR | ||
if: github.actor != 'dependabot[bot]' | ||
run: | | ||
gcloud auth configure-docker --quiet | ||
docker push ${{ steps.construct-tags.outputs.sha-tag }} | ||
docker push ${{ steps.construct-tags.outputs.environment-tag }} | ||
report-to-sherlock: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -43,4 +43,7 @@ cypress.env.json | |
ca-bundle.crt | ||
server.crt | ||
server.key | ||
site.conf | ||
site.conf | ||
|
||
## GHA Credentials | ||
gha-creds-*.json |