Skip to content

Create subgraph

Create subgraph #1

name: Create subgraph
on:
workflow_dispatch:
inputs:
environment:
description: 'dev/prod env'
default: 'development'
type: choice
required: true
options:
- development
- production
subgraph_name:
description: 'subgraph name'
required: true
type: string
jobs:
build:
environment: development
runs on: self-hosted

Check failure on line 21 in .github/workflows/create-subgraph.yml

View workflow run for this annotation

GitHub Actions / Create subgraph

Invalid workflow file

The workflow is not valid. .github/workflows/create-subgraph.yml (Line: 21, Col: 5): Unexpected value 'runs on' .github/workflows/create-subgraph.yml (Line: 20, Col: 5): Required property is missing: runs-on
steps:
- uses: actions/checkout@v3
- name: Install graph-cli
run: |
sudo yarn global add @graphprotocol/graph-cli
- name: Install yq
run: |
sudo add-apt-repository ppa:rmescandon/yq
sudo apt update
sudo apt install yq -y
yq --version
- name: Read sub.folder.name from folder.yaml and create subgraph
run: |
if [ "${{ github.event.inputs.environment }}" == "development" ]; then
NODE_URL="$DEV_NODE_URL"
else
NODE_URL="$PROD_NODE_URL"
fi
graph create --node $NODE_URL $SUBGRAPH_NAME
env:
DEV_NODE_URL: ${{ secrets.DEV_NODE_URL }}
PROD_NODE_URL: ${{ secrets.PROD_NODE_URL }}
SUBGRAPH_NAME: ${{ github.events.inputs.subgraph_name }}