Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: force the production subgraph deployment to be on a release tag #854

Merged
merged 4 commits into from
Nov 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .github/workflows/deploy-prod-subgraph.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@ name: Deploy subgraph to production env

on:
workflow_dispatch:
branches: [main]
inputs:
version:
description: "The subgraph version to deploy. For example, 1.34.0. The given number should correspond to an existing tag @bosonprotocol/subgraph@<VERSION>"
required: true

jobs:
deploy:
Expand All @@ -12,6 +15,8 @@ jobs:
- uses: actions/checkout@v3
with:
token: ${{ secrets.BSNORG_ACTIONS_SECRET }}
ref: "@bosonprotocol/subgraph@${{ inputs.version }}"
fetch-depth: "0"
- uses: actions/setup-node@v3
with:
node-version: "20"
Expand Down Expand Up @@ -46,6 +51,7 @@ jobs:
GH_TOKEN: ${{ secrets.BSNORG_ACTIONS_SECRET }}
GITHUB_TOKEN: ${{ secrets.BSNORG_ACTIONS_SECRET }}
run: |
git pull origin main
git add .
git commit -m "chore: deploy production subgraphs [skip ci]"
git push origin HEAD
git push origin HEAD:main
Loading