Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
feat: changed check-api-breaking with oasdiff
Akhil Mohan4fdfcd50dc97
diff --git a/.github/workflows/check-api-for-breaking-changes.yml b/.github/workflows/check-api-for-breaking-changes.ymlindex f6acd084cd..bef27df2e2 100644--- a/.github/workflows/check-api-for-breaking-changes.yml+++ b/.github/workflows/check-api-for-breaking-changes.yml@@ -14,36 +14,42 @@ jobs:steps:- name: Checkout sourceuses: actions/checkout@v3- - name: Setup Node 20- uses: actions/setup-node@v3- with:- node-version: "20"- # uncomment this when testing locally using nektos/act- # - uses: KengoTODA/actions-setup-docker-compose@v1- # if: ${{ env.ACT }}- # name: Install `docker-compose` for local simulations+ # - name: Setup Node 20+ # uses: actions/setup-node@v3# with:- # version: "2.14.2"+ # node-version: "20"+ # uncomment this when testing locally using nektos/act+ - uses: KengoTODA/actions-setup-docker-compose@v1+ if: ${{ env.ACT }}+ name: Install `docker-compose` for local simulations+ with:+ version: "2.14.2"- name: 📦Build the latest imagerun: docker build --tag infisical-api .working-directory: backend- name: Start postgres and redisrun: touch .env && docker-compose -f docker-compose.pg.yml up -d db redis- name: Start the server- run: docker run --name infisical-api -d -p 4000:4000 -e DB_CONNECTION_URI=$DB_CONNECTION_URI -e REDIS_URL=$REDIS_URL -e JWT_AUTH_SECRET=$JWT_AUTH_SECRET --entrypoint '/bin/sh' infisical-api -c "npm run migration:latest && ls && node dist/main.mjs"+ run: |+ echo "SECRET_SCANNING_GIT_APP_ID=793712" >> .env+ echo "SECRET_SCANNING_PRIVATE_KEY=some-random" >> .env+ echo "SECRET_SCANNING_WEBHOOK_SECRET=some-random" >> .env+ docker run --name infisical-api -d -p 4000:4000 -e DB_CONNECTION_URI=$DB_CONNECTION_URI -e REDIS_URL=$REDIS_URL -e JWT_AUTH_SECRET=$JWT_AUTH_SECRET --env-file .env --entrypoint '/bin/sh' infisical-api -c "npm run migration:latest && ls && node dist/main.mjs"env:REDIS_URL: redis://172.17.0.1:6379DB_CONNECTION_URI: postgres://infisical:[email protected]:5432/infisical?sslmode=disableJWT_AUTH_SECRET: something-random- - name: Install openapi api diff- run: npm install -g openapi-diff+ - uses: actions/setup-go@v5+ with:+ go-version: '1.21.5'- name: Wait for containers to be stablerun: timeout 60s sh -c 'until docker ps | grep infisical-api | grep -q healthy; do echo "Waiting for container to be healthy..."; sleep 2; done'- - name: Get changes made in API- id: openapi-diff- run: openapi-diff https://app.infisical.com/api/docs/json http://localhost:4000/api/docs/json+ - name: Install openapi-diff+ run: go install github.com/tufin/oasdiff@latest+ - name: Running OpenAPI Spec diff action+ run: oasdiff breaking https://app.infisical.com/api/docs/json http://localhost:4000/api/docs/json --fail-on ERR- name: cleanup- run: |+ run: |docker-compose -f "docker-compose.pg.yml" downdocker stop infisical-apidocker remove infisical-api