Skip to content

update-aws-apis

update-aws-apis #515

Workflow file for this run

name: update-aws-apis
# originally based on https://github.com/victoriadrake/victoriadrake/blob/master/.github/workflows/update.yaml
on:
push:
branches:
- main
schedule:
- cron: '0 19 * * 1-5'
workflow_dispatch: {}
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: 🍽️ Get working copy
uses: actions/checkout@master
with:
fetch-depth: 1
- name: 🍳 Update
run: |
git clone https://github.com/apis-guru/openapi-directory
git clone --depth 1 https://github.com/aws/aws-sdk-js
cd aws-sdk-js
echo "SDKTAG=`git describe --abbrev=0 --tags`" >> $GITHUB_ENV
cd ..
npm i
node getPreferred ./aws-sdk-js/apis
node aws2openapi ./aws-sdk-js/apis ./openapi-directory/APIs/amazonaws.com -y
- name: 🚀 Deploy
id: deploy
run: |
cd openapi-directory/APIs
git config user.name "Mike Ralphson"
git config user.email "MikeRalphson@users.noreply.github.com"
git add amazonaws.com
git diff-index --quiet HEAD || git commit -am "Update AWS APIs to $SDKTAG" && echo "::set-output name=ok::1"
git push https://${{ secrets.GH_PAT }}@github.com/apis-guru/openapi-directory.git
- name: Trigger oad CI
if: ${{ steps.deploy.outputs.ok == '1' }}
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.GH_PAT }}
repository: Mermade/oad
event-type: ci