Skip to content

Commit

Permalink
Merge branch 'main' of github.com:wundergraph/cosmo-previews into suv…
Browse files Browse the repository at this point in the history
…ij/update-subgraph
  • Loading branch information
JivusAyrus committed Aug 13, 2024
2 parents ba0455b + ecc4dde commit cabc4c7
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 3 deletions.
32 changes: 32 additions & 0 deletions .github/actions/cosmo-previews/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: 'Cosmo Previews'
description: 'This action helps to create a preview of your new subgraph changes.'
author: 'WunderGraph Cosmo'

# Add your action's branding here. This will appear on the GitHub Marketplace.
branding:
icon: 'heart'
color: 'red'

# Define your inputs here.
inputs:
config_path:
description: 'The path to cosmo.yaml file'
default: '.github/cosmo.yaml'
create:
description: 'Create the feature flag + subgraphs from cosmo.yaml'
default: false
update:
description: 'Only update the feature subgraphs from cosmo.yaml'
default: false
destroy:
description: 'Only destroy the feature flag + subgraphs from cosmo.yaml'
default: false
cosmo_api_key:
description: 'The API key to authenticate with Cosmo'

# # Define your outputs here.
# outputs:

runs:
using: node20
main: dist/index.js
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
steps:
# 1. Create & Publish feature subgraph based on cosmo.yaml
# 2. Create a new feature flag
- uses: ./action.yml
- uses: .github/actions/cosmo-previews
id: ff
with:
config_path: .github/cosmo.yaml
Expand All @@ -37,7 +37,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event.action == 'synchronize'
steps:
- uses: ./action.yml
- uses: .github/actions/cosmo-previews
with:
config_path: .github/cosmo.yaml
update: true # Only update the feature subgraphs from cosmo.yaml
Expand All @@ -49,7 +49,7 @@ jobs:
runs-on: ubuntu-latest
if: github.event.action == 'closed'
steps:
- uses: ./action.yml
- uses: .github/actions/cosmo-previews
id: ff
with:
config_path: .github/cosmo.yaml
Expand Down

0 comments on commit cabc4c7

Please sign in to comment.