Skip to content

Commit

Permalink
Merge pull request #229 from interledger/mk-add-integration-publish
Browse files Browse the repository at this point in the history
feat: adding integration workflows
  • Loading branch information
mkurapov authored Dec 8, 2022
2 parents 44145da + 62e753f commit 54f4bdc
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 7 deletions.
16 changes: 16 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<!--
If updating the specs in /openapi, you can test the changes by merging your branch into integration, and navigating to https://open-payments-integration.readme.io
-->

## Changes proposed in this pull request

<!--
Provide a succinct description of what this pull request entails.
-->

## Context

<!--
What were you trying to do?
Link issues here - using `fixes #number`
-->
14 changes: 14 additions & 0 deletions .github/workflows/publish-integration-openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: OpenAPI Integration Publisher

on:
push:
branches:
- integration

jobs:
publish-integration:
uses: ./.github/workflows/publish-openapi.yaml
secrets:
README_RESOURCE_API_ID: ${{ secrets.README_INTEGRATION_RESOURCE_API_ID }}
README_AUTH_API_ID: ${{ secrets.README_INTEGRATION_AUTH_API_ID }}
README_API_KEY: ${{ secrets.README_INTEGRATION_API_KEY }}
16 changes: 9 additions & 7 deletions .github/workflows/publish-openapi.yaml
Original file line number Diff line number Diff line change
@@ -1,24 +1,26 @@
name: OpenAPI Publisher

on:
workflow_run:
workflows: ['OpenAPI Validator']
branches: [main]
types:
- completed
workflow_call:
secrets:
README_API_KEY:
required: true
README_RESOURCE_API_ID:
required: true
README_AUTH_API_ID:
required: true

jobs:
publish:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v3
name: Check out repository

- uses: readmeio/[email protected]
name: Sync Open Payments API spec
with:
rdme: openapi resource-server.yaml --workingDirectory=openapi --key=${{ secrets.README_API_KEY }} --id=${{ secrets.README_OP_API_ID }}
rdme: openapi resource-server.yaml --workingDirectory=openapi --key=${{ secrets.README_API_KEY }} --id=${{ secrets.README_RESOURCE_API_ID }}

- uses: readmeio/[email protected]
name: Sync Auth Server API spec
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/publish-prod-openapi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: OpenAPI Prod Publisher

on:
workflow_run:
workflows: ['OpenAPI Validator']
branches: [main]
types:
- completed

jobs:
publish-prod:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: ./.github/workflows/publish-openapi.yaml
secrets:
README_RESOURCE_API_ID: ${{ secrets.README_OP_API_ID }}
README_AUTH_API_ID: ${{ secrets.README_AUTH_API_ID }}
README_API_KEY: ${{ secrets.README_API_KEY }}
1 change: 1 addition & 0 deletions .github/workflows/validate-openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main
- integration
paths:
- openapi/**
pull_request:
Expand Down

0 comments on commit 54f4bdc

Please sign in to comment.