Skip to content

Commit

Permalink
attempt to update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
TristenHarr committed Aug 5, 2024
1 parent 1f33dad commit 936a641
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 4 deletions.
32 changes: 31 additions & 1 deletion .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,34 @@ jobs:
body: ${{ steps.changelog-reader.outputs.changes }}
files: |
./connector-definition/dist/connector-definition.tgz
fail_on_unmatched_files: true
fail_on_unmatched_files: true

- name: Update ndc-hub
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CONNECTOR_NAME: turso
run: |
# Clone ndc-hub repository
git clone https://github.com/hasura/ndc-hub.git
cd ndc-hub
# Create a new branch
git checkout -b update-${{ env.CONNECTOR_NAME }}-connector-v${{ steps.get-version.outputs.tagged_version }}

cd registry/${{ env.CONNECTOR_NAME }}

# Update metadata.json
jq --arg version "${{ steps.get-version.outputs.tagged_version }}" \
--arg version_tag "v${{ steps.get-version.outputs.tagged_version }}" \
'.packages += [{"version": $version}] |
.source_code.version += [{"tag": $version_tag}]' \
metadata.json > tmp.json && mv tmp.json metadata.json

# Commit changes
git config user.name "GitHub Action"
git config user.email "action@github.com"
git add metadata.json
git commit -m "Update ${{ env.CONNECTOR_NAME }} connector metadata to version ${{ steps.get-version.outputs.tagged_version }}"

# Push changes
git push https://${{ secrets.GITHUB_TOKEN }}@github.com/hasura/ndc-hub.git HEAD:update-${{ env.CONNECTOR_NAME }}-connector-v${{ steps.get-version.outputs.tagged_version }}
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ This changelog documents changes between release tags.
## [Unreleased]
Upcoming changes for the next versioned release.

## [0.0.18]
* Attempt to integrate push to ndc-hub workflow

## [0.0.17]
* Bump version

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ndc-turso",
"version": "0.0.17",
"version": "0.0.18",
"main": "index.js",
"author": "Tristen Harr",
"scripts": {
Expand Down

0 comments on commit 936a641

Please sign in to comment.