Skip to content

Commit

Permalink
Add upload chain artifacts workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ImTei committed Aug 2, 2024
1 parent 4810f97 commit ecbbd9a
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/upload-chain-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Upload Chain Artifacts

on:
workflow_dispatch:
inputs:
chain:
description: 'The name of the target chain (e.g. op-mainnet)'
required: true

jobs:
upload-chain-artifacts:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Set up Google Cloud SDK
uses: google-github-actions/setup-gcloud@v2
with:
version: 'latest'
service_account_key: ${{ secrets.GCP_CREDENTIALS }}
export_default_credentials: true

- 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
run: |
gsutil cp ./generate-genesis/output-${{ env.COMMIT_HASH }}/${{ github.event.inputs.chain }}.json \
gs://${{ secrets.GCS_BUCKET }}/chains/${{ github.event.inputs.chain }}/genesis.json
gsutil cp ./generate-rollup-config/output-${{ env.COMMIT_HASH }}/${{ github.event.inputs.chain }}.json \
gs://${{ secrets.GCS_BUCKET }}/chains/${{ github.event.inputs.chain }}/output-${{ env.COMMIT_HASH }}/rollup.json

0 comments on commit ecbbd9a

Please sign in to comment.