Check Status of APIs for openapi-examples #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Status of APIs for openapi-examples | |
on: | |
schedule: | |
# Run every 2 hours | |
- cron: '0 */2 * * *' | |
# Run manually | |
workflow_dispatch: {} | |
jobs: | |
check-status-of-apis: | |
runs-on: ubicloud | |
defaults: | |
run: | |
working-directory: sdks/ | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Checkout openapi-examples | |
uses: actions/checkout@v2 | |
with: | |
repository: konfig-sdks/openapi-examples | |
path: sdks/openapi-examples | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
cache: yarn | |
cache-dependency-path: sdks/yarn.lock | |
- name: Set up SSH key for submodule access | |
uses: webfactory/[email protected] | |
with: | |
ssh-private-key: ${{ secrets.OPENAPI_EXAMPLES_SUBMODULE_DEPLOY_KEY }} | |
- run: yarn install --network-timeout 600000 | |
- run: yarn check-status-of-apis | |
- name: Commit and push changes | |
working-directory: sdks/openapi-examples | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "konfig-publisher" | |
git add -A | |
git commit -m "🤖 automation: perform status check on all APIs" | |
git push | |