Skip to content

Commit cb8e3c6

Browse files
committed
workaround for skiff2 setup action.yaml
1 parent c4de342 commit cb8e3c6

File tree

2 files changed

+51
-1
lines changed

2 files changed

+51
-1
lines changed

.github/skiff2-setup-action.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
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

.github/workflows/build-and-push-evals.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
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 }}

0 commit comments

Comments
 (0)