Skip to content

Update API client (dev) #333

Update API client (dev)

Update API client (dev) #333

name: Update API client (dev)
on:
workflow_dispatch:
schedule:
- cron: "0 19 * * *"
jobs:
update-client:
runs-on: ubuntu-latest
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
PUBLISH_PAT: ${{ secrets.PUBLISH_PAT }}
GH_TOKEN: ${{ secrets.PUBLISH_PAT }}
steps:
- name: Checkout ⬇️
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.PUBLISH_PAT }}
ref: dev
- name: Git Identity 🪪
run: |
git config user.name "${{ github.actor }}"
git config user.email "${{ github.actor }}@users.noreply.github.com"
- name: Yarn Install 📦️
run: yarn install --immutable
- name: Setup NX 🎛️
uses: nrwl/nx-set-shas@v4
- name: Merge in master ⛙
run: |
git merge refs/remotes/origin/master --strategy-option theirs
- name: Update OpenAPI ⬇️
run: |
yarn nx run @mittwald/api-client:build:fetch-openapi-dev
if [ $(git status --porcelain . | wc -l) -gt 0 ] ; then
yarn nx run @mittwald/api-client:build:client-dev
git add .
yarn test
git commit -m "chore: update generated development client";
git push origin
fi