File tree Expand file tree Collapse file tree 2 files changed +51
-1
lines changed
Expand file tree Collapse file tree 2 files changed +51
-1
lines changed Original file line number Diff line number Diff line change 1+ name : Setup GCP and Docker
2+ description : Sets up Google Cloud authentication, Cloud SDK, and Docker for GCR
3+ author : Skiff
4+
5+ inputs :
6+ workload_identity_provider :
7+ description : " Workload Identity Provider resource name (e.g. projects/123/locations/global/workloadIdentityPools/my-pool/providers/my-provider)"
8+ required : true
9+ service_account :
10+ description : " Service account email to impersonate"
11+ required : true
12+ project_id :
13+ description : " GCP project ID"
14+ required : true
15+
16+ runs :
17+ using : composite
18+ steps :
19+ - name : Check branch is main
20+ shell : bash
21+ run : |
22+ if [ "${{ github.ref }}" != "refs/heads/main" ]; then
23+ echo "This action can only run on the main branch. Current ref: ${{ github.ref }}"
24+ exit 1
25+ fi
26+
27+ - name : Checkout calling repository
28+ uses : actions/checkout@v4
29+
30+ - name : Authenticate to Google Cloud
31+ uses : google-github-actions/auth@v2
32+ with :
33+ workload_identity_provider : ${{ inputs.workload_identity_provider }}
34+ service_account : ${{ inputs.service_account }}
35+
36+ - name : Set up Cloud SDK
37+ uses : google-github-actions/setup-gcloud@v2
38+ with :
39+ project_id : ${{ inputs.project_id }}
40+
41+ - name : Configure Docker for GCR
42+ shell : bash
43+ run : gcloud auth configure-docker
44+
45+ - name : Set up Docker Buildx
46+ uses : docker/setup-buildx-action@v3
47+
48+ branding :
49+ icon : cloud
50+ color : blue
Original file line number Diff line number Diff line change 2727 steps :
2828 - name : Skiff2 Setup
2929 id : setup
30- uses : allenai/skiff-commodore/shared-actions/ setup/@main
30+ uses : ./.github/ setup-action.yml
3131 with :
3232 workload_identity_provider : ${{ vars.SKIFF2_WORKLOAD_IDENTITY_PROVIDER }}
3333 service_account : ${{ vars.SKIFF2_SERVICE_ACCOUNT }}
You can’t perform that action at this time.
0 commit comments