Skip to content

Commit

Permalink
add release name to supergraph configmap
Browse files Browse the repository at this point in the history
  • Loading branch information
iamvigneshwars committed Jul 2, 2024
1 parent b43ad78 commit 96663dc
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 25 deletions.
27 changes: 4 additions & 23 deletions .github/workflows/schema-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
steps:
- name: Install Rover CLI
run: |
curl -sSL https://rover.apollo.dev/nix/v0.23.0-rc.3 | sh
curl -sSL https://rover.apollo.dev/nix/latest | sh
echo "$HOME/.rover/bin" >> $GITHUB_PATH
- name: Checkout Source
Expand Down Expand Up @@ -90,22 +90,11 @@ jobs:
rover supergraph compose
--config supergraph-config.yaml
--elv2-license=accept
> old_supergraph.graphql
- name: Upload Old Schema Artifact
uses: actions/upload-artifact@v4.3.3
with:
name: old_supergraph.graphql
path: old_supergraph.graphql
> /tmp/old_supergraph.graphql
- name: Checkout Source
uses: actions/checkout@v4.1.4

- name: Download old Schema Artifact
uses: actions/download-artifact@v4.1.7
with:
name: old_supergraph.graphql

- name: Compose New Supergraph Schema
run: >
rover supergraph compose
Expand All @@ -114,19 +103,11 @@ jobs:
> supergraph.graphql
- name: Generate Schema Diff
continue-on-error: true
run: |
git diff --no-index old_supergraph.graphql supergraph.graphql > diff.md
- name: Check if Diff Exists
id: diff-check
run: |
git --no-pager diff --no-index --no-exit-code /tmp/old_supergraph.graphql supergraph.graphql > diff.md
if [ -s diff.md ]; then echo "has_diff=true" >> $GITHUB_ENV; fi
- name: Format Diff into Markdown
run: |
sed -i '1s/^/```diff\n/; $a```' diff.md
- name: Comment PR with artefact comparison report
if: env.has_diff == 'true'
uses: JoseThen/comment-pr@v1.2.0
Expand Down
2 changes: 1 addition & 1 deletion charts/supergraph/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
apiVersion: v2
name: supergraph
version: 0.1.0
version: 0.1.1
2 changes: 1 addition & 1 deletion charts/supergraph/template/schema-configmap.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: supergraph-schema
name: {{ .Release.Name }}-supergraph-schema
data:
supergraph.graphql: |-
{{ (.Files.Get .Values.supergraphPath) | nindent 4 }}

0 comments on commit 96663dc

Please sign in to comment.