Skip to content

Commit

Permalink
Merge pull request #37 from gnosis/github_actions
Browse files Browse the repository at this point in the history
Add buildcode to prod worflow
  • Loading branch information
gMonty030 authored Oct 28, 2024
2 parents 1cd647d + b93caf6 commit 039b5fd
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/prod_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,23 @@ jobs:
- name: Authenticate to Subgraph Studio
run: graph auth --studio ${{ secrets.DEPLOY_KEY }}

# Script to deploy to development environment
# Script to deploy to production environment
- name: Generate Random ID for buildcode
id: random_id
run: |
echo "random_id=$(openssl rand -hex 4)" >> $GITHUB_OUTPUT
- name: Deploy Subgraph for ETH mainnet
if: ${{ inputs.network == 'Ethereum' }}
run: yarn deploy -l "${{ steps.release_tag.outputs.tag }}"
run: yarn deploy -l "${{ steps.release_tag.outputs.tag }}-${{ steps.random_id.outputs.random_id }}"

- name: Deploy Subgraph for Gnosis Chain
if: ${{ inputs.network == 'Gnosis Chain' }}
run: yarn deploy:gc -l "${{ steps.release_tag.outputs.tag }}"
run: yarn deploy:gc -l "${{ steps.release_tag.outputs.tag }}-${{ steps.random_id.outputs.random_id }}"

- name: Deploy Subgraph for both Netwroks
if: ${{ inputs.network == 'ALL' }}
run: yarn deploy -l "${{ steps.release_tag.outputs.tag }}" && yarn deploy:gc -l "${{ steps.release_tag.outputs.tag }}"
run: yarn deploy -l "${{ steps.release_tag.outputs.tag }}-${{ steps.random_id.outputs.random_id }}" && yarn deploy:gc -l "${{ steps.release_tag.outputs.tag }}-${{ steps.random_id.outputs.random_id }}"

notify:
uses: ./.github/workflows/slack_release_notification.yml
Expand Down

0 comments on commit 039b5fd

Please sign in to comment.