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

hive registry integration #392

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Show file tree
Hide file tree
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
12 changes: 6 additions & 6 deletions .github/workflows/docker-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
push:
# Publish `master` as Docker `latest` image.
branches:
- master
- story-new-graphql-proxy

# Publish `v1.2.3` tags as releases.
tags:
Expand Down Expand Up @@ -41,21 +41,21 @@ jobs:
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
# Strip "v" prefix from tag name
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
# Use Docker `latest` tag convention
[ "$VERSION" == "master" ] && VERSION=latest
# Use Docker `graphql_proxy` tag convention
[ "$VERSION" == "story-new-graphql-proxy" ] && VERSION=graphql_proxy
echo IMAGE_ID=$IMAGE_ID
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
# Add latest tag if we are on master and github.ref points to a tag
# Add graphql_proxy tag if we are on story-new-graphql-proxy and github.ref points to a tag
if [[ "${{ github.ref }}" == "refs/tags/"* ]]; then
MASTER=$(git show-ref --hash origin/master)
MASTER=$(git show-ref --hash origin/story-new-graphql-proxy)
echo "master: $MASTER"
HEAD=$(git rev-parse HEAD)
echo "head: $HEAD"
echo "github.ref ${{ github.ref }}"
if [[ $MASTER == $HEAD ]]; then
VERSION=latest
VERSION=graphql_proxy
echo VERSION=$VERSION
docker tag $IMAGE_NAME $IMAGE_ID:$VERSION
docker push $IMAGE_ID:$VERSION
Expand Down
22 changes: 22 additions & 0 deletions .github/workflows/hive-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Hive Publish

on:
push:
branches: [story-new-graphql-proxy]

jobs:
hive-publish:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: schema publish
env:
HIVE_TOKEN: ${{ secrets.HIVE_TOKEN_DEVELOPMENT }}
# HIVE_ENDPOINT: ${{ secrets.HIVE_ENDPOINT }}
SCHEMA_PATH: "src/schema/api.graphql"
run: |
curl -sSL https://graphql-hive.com/install.sh | sh
hive schema:publish "${{ env.SCHEMA_PATH }}" \
--registry.accessToken ${{ env.HIVE_TOKEN }} \
--github
21 changes: 21 additions & 0 deletions .github/workflows/hive-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Hive Check

on:
pull_request:
branches: [story-new-graphql-proxy]

jobs:
hive-check:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: schema check
env:
HIVE_TOKEN: ${{ secrets.HIVE_TOKEN_DEVELOPMENT }}
SCHEMA_PATH: "src/schema/api.graphql"
run: |
curl -sSL https://graphql-hive.com/install.sh | sh
hive schema:check "${{ env.SCHEMA_PATH }}" \
--registry.accessToken ${{ env.HIVE_TOKEN }} \
--github