-
Notifications
You must be signed in to change notification settings - Fork 3.7k
61 lines (53 loc) · 2.19 KB
/
workflow-run-replay-verify-archive-storage-provision.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: "*run archive storage provision workflow"
on:
# This allows the workflow to be triggered from another workflow
workflow_call:
inputs:
NETWORK:
required: true
type: string
description: The network to provision storage for.
workflow_dispatch:
inputs:
NETWORK:
description: The network to provision storage for.
type: string
required: true
jobs:
provision:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref || github.ref }}
# Authenticate to Google Cloud the project is aptos-ci
- name: Authenticate to Google Cloud
id: auth
uses: "google-github-actions/auth@v2"
with:
workload_identity_provider: ${{ secrets.GCP_WORKLOAD_IDENTITY_PROVIDER }}
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT_EMAIL }}
export_environment_variables: false
create_credentials_file: true
# This is required since we need to switch from aptos-ci to aptos-devinfra-0
- name: Setup Credentials
run: |
echo "GOOGLE_APPLICATION_CREDENTIALS=${{ steps.auth.outputs.credentials_file_path }}" >> $GITHUB_ENV
echo "CLOUDSDK_AUTH_CREDENTIAL_FILE_OVERRIDE=${{ steps.auth.outputs.credentials_file_path }}" >> $GITHUB_ENV
echo "GOOGLE_GHA_CREDS_PATH=${{ steps.auth.outputs.credentials_file_path }}" >> $GITHUB_ENV
echo "CLOUDSDK_AUTH_ACCESS_TOKEN=${{ steps.auth.outputs.access_token }}" >> $GITHUB_ENV
- name: Set up Cloud SDK
uses: "google-github-actions/setup-gcloud@v2"
with:
install_components: "kubectl, gke-gcloud-auth-plugin"
- name: "Setup GCloud Project"
shell: bash
run: gcloud config set project aptos-devinfra-0
- uses: ./.github/actions/python-setup
with:
pyproject_directory: testsuite/replay-verify
- name: "Provision Storage"
env:
GOOGLE_CLOUD_PROJECT: aptos-devinfra-0
run: cd testsuite/replay-verify && poetry run python archive_disk_utils.py --network ${{ inputs.NETWORK }}