Upload Chain Artifacts #16
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
name: Upload Chain Artifacts | |
on: | |
workflow_dispatch: | |
inputs: | |
chain: | |
description: 'The name of the target chain (e.g. op-mainnet)' | |
required: true | |
permissions: | |
contents: read | |
id-token: write | |
jobs: | |
upload-chain-artifacts: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Google cloud auth | |
uses: 'google-github-actions/auth@v2' | |
env: | |
CLOUDSDK_CORE_LOGGING_LEVEL: DEBUG | |
with: | |
create_credentials_file: "true" | |
workload_identity_provider: ${{ secrets.GCP_IDENTITY_PROVIDER }} | |
service_account: ${{ secrets.GCP_SERVICE_ACCOUNT }} | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v2' | |
- name: Get current commit hash | |
run: echo "COMMIT_HASH=$(git rev-parse HEAD)" >> $GITHUB_ENV | |
- name: Generate genesis file | |
working-directory: validation | |
run: | | |
go run generate-genesis/main.go ${{ env.COMMIT_HASH }} | |
- name: Generate rollup config | |
working-directory: validation | |
run: | | |
go run generate-rollup-config/main.go ${{ env.COMMIT_HASH }} | |
- name: Upload artifacts | |
working-directory: validation | |
env: | |
CLOUDSDK_CORE_LOGGING_LEVEL: DEBUG | |
run: | | |
gsutil -d cp ./generate-genesis/output-${{ env.COMMIT_HASH }}/${{ github.event.inputs.chain }}.json \ | |
gs://${{ secrets.GCS_BUCKET }}/chains/${{ github.event.inputs.chain }}/${{ env.COMMIT_HASH }}/genesis.json | |
gsutil -d cp ./generate-rollup-config/output-${{ env.COMMIT_HASH }}/${{ github.event.inputs.chain }}.json \ | |
gs://${{ secrets.GCS_BUCKET }}/chains/${{ github.event.inputs.chain }}/${{ env.COMMIT_HASH }}/rollup.json | |