Skip to content

Commit

Permalink
Add default reset workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Keith Halsall committed Oct 30, 2024
1 parent ec5eb48 commit 02a372d
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/prepare-connectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@ env:
APOLLO_KEY: ${{ vars.TOKEN }}

jobs:
publish:
reset:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create report file
- name: Reset files
run: |
cp -f $GITHUB_WORKSPACE/connector-default/orders-schema.graphql $GITHUB_WORKSPACE/orders-schema.graphql
cp -f $GITHUB_WORKSPACE/connector-default/customers-schema.graphql $GITHUB_WORKSPACE/customers-schema.graphql
cp -f $GITHUB_WORKSPACE/connector-default/products-schema.graphql $GITHUB_WORKSPACE/products-schema.graphql
cp -f $GITHUB_WORKSPACE/connector-default/router.yaml $GITHUB_WORKSPACE/router/router.yaml
- name: Commit report
- name: Commit changes
run: |
git config --global user.name 'Automated Process'
git config --global user.email '[email protected]'
Expand Down
30 changes: 30 additions & 0 deletions .github/workflows/reset-default.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Reset files to default config

on:
workflow_dispatch:

env:
GEN: ${{ secrets.GEN || 'ws1' }}
APOLLO_KEY: ${{ vars.TOKEN }}

jobs:
reset:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v3
- name: Reset files
run: |
cp -f $GITHUB_WORKSPACE/default/orders-schema.graphql $GITHUB_WORKSPACE/orders-schema.graphql
cp -f $GITHUB_WORKSPACE/default/customers-schema.graphql $GITHUB_WORKSPACE/customers-schema.graphql
cp -f $GITHUB_WORKSPACE/default/products-schema.graphql $GITHUB_WORKSPACE/products-schema.graphql
cp -f $GITHUB_WORKSPACE/default/router.yaml $GITHUB_WORKSPACE/router/router.yaml
- name: Commit changes
run: |
git config --global user.name 'Automated Process'
git config --global user.email '[email protected]'
git commit -am "Prep env for connectors lab"
git push
16 changes: 1 addition & 15 deletions connector-default/router.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,4 @@ subscription:
products:
path: /

## Enter Workshop Module Configs Below

## Authentication Module
authentication:
router:
jwt:
header_name: Authorization
header_value_prefix: Bearer
jwks:
- url: https://www.googleapis.com/service_accounts/v1/jwk/[email protected]

authorization:
require_authentication: false
preview_directives:
enabled: true
## Enter Workshop Module Configs Below
31 changes: 31 additions & 0 deletions default/router.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Configuration of the router's HTTP server
# Default configuration for container
supergraph:
# The socket address and port to listen on
listen: 0.0.0.0:${env.PORT:-4000}
introspection: true

# For demo purposes - can remove or enable homepage
sandbox:
enabled: true
homepage:
enabled: false

cors:
origins:
- https://studio.apollographql.com
allow_credentials: true

# This would make debugging easier, but should be a per subgraph basis for production
include_subgraph_errors:
all: true # Propagate errors from all subgraphs

subscription:
mode:
passthrough:
# docker setup, for local setup comment out the following section
subgraphs:
products:
path: /

## Enter Workshop Module Configs Below

0 comments on commit 02a372d

Please sign in to comment.