add the ability delete humans #36
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: Quality Pipeline | |
permissions: write-all | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
release: | |
types: | |
- created | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
environment: | |
name: GithubActions | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '20' # or your preferred Node version | |
- name: Install dependencies | |
run: yarn install | |
- name: Generate OpenAPI spec | |
run: yarn generate | |
# Run Spectral | |
- uses: stoplightio/spectral-action@latest | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
file_glob: 'spec/*.json' | |
# Extra step that runs only on release | |
- name: Update Documentation | |
run: yarn updatePostman | |
env: | |
POSTMAN_API_KEY: ${{ secrets.POSTMAN_API_KEY }} | |
if: github.event_name == 'release' | |
- name: Setup Deck | |
run: | | |
curl -sL https://github.com/kong/deck/releases/download/v1.25.0/deck_1.25.0_linux_amd64.tar.gz -o deck.tar.gz | |
tar -xf deck.tar.gz -C /tmp | |
sudo cp /tmp/deck /usr/local/bin/ | |
# Ping to your Kong instance | |
- name: decK ping | |
id: decK_ping | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DECK_GROUP_NAME: ${{ secrets.DECK_GROUP_NAME }} | |
DECK_PAT: ${{ secrets.DECK_PAT }} | |
run: deck ping --konnect-runtime-group-name ${{ secrets.DECK_GROUP_NAME }} --konnect-token ${{ secrets.DECK_PAT }} | |
if: github.event_name == 'release' | |
# Generate Config File to sync | |
- name: decK file openapi2kong | |
id: deck_file_openapi2kong | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DECK_GROUP_NAME: ${{ secrets.DECK_GROUP_NAME }} | |
DECK_PAT: ${{ secrets.DECK_PAT }} | |
run: deck file openapi2kong --spec ./spec/petStore.json --output-file ./kong/petStoreKong.yaml | |
if: github.event_name == 'release' | |
# Sync the state of the files to the Kong instance and update the deployment status in your repo by GitHub Deployment API | |
- name: decK sync | |
id: decK_sync | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
DECK_GROUP_NAME: ${{ secrets.DECK_GROUP_NAME }} | |
DECK_PAT: ${{ secrets.DECK_PAT }} | |
run: deck sync -s ./kong/petStoreKong.yaml --konnect-runtime-group-name ${{ secrets.DECK_GROUP_NAME }} --konnect-token ${{ secrets.DECK_PAT }} | |
if: github.event_name == 'release' |