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

chore: add github action to update enigma-go with latest engine schema #306

Closed
wants to merge 2 commits into from
Closed
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
44 changes: 44 additions & 0 deletions .github/workflows/update-api-spec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Update enigma-go to new engine schema

on:
schedule:
- cron: 0 4 * * 1 # Every monday at 04:00
workflow_dispatch:

jobs:
fetch-api-specs:
uses: qlik-trial/dev-portal/.github/workflows/update-api-specs.yaml@master
secrets: inherit
with:
repository: qlik-oss/enigma-go
ref: master
internal_apis: false
stage_apis: false
specs_dir: "schema"
update-api-specs:
runs-on: ubuntu-latest
needs: fetch-api-specs
steps:
- name: Checkout qlik-oss/enigma-go@get-latest-specs
uses: actions/checkout@v3
with:
repository: qlik-oss/enigma-go
token: ${{ secrets.GH_ACCESS_TOKEN }}
ref: get-latest-specs
- name: Copy the engine spec to the correct location
run: |
rm $(find schema/ -not -type d | grep -v -e /openRPC/)
mv schema/openRPC/engine-rpc.json schema/engine-rpc.json
rm -rf schema/openRPC
- name: Generate enigma-go and update the API specification
run: |
make update-engine-version
- name: Create a pull request with the updated files
run: |
git config user.name 'qlikossbuild'
git config user.email '[email protected]'
git add ./api-spec.json
git add ./qix_generated.go
git add ./schema/engine-rpc.json
git commit -m "chore: generate enigma-go"
git push