diff --git a/.github/workflows/postman.yaml b/.github/workflows/postman.yaml index 8ccdafe..1864b9d 100644 --- a/.github/workflows/postman.yaml +++ b/.github/workflows/postman.yaml @@ -1,12 +1,14 @@ name: Sync Postman Collection on: push: - branches: - - main + +env: + ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Sandbox' }} + jobs: postman-sync: runs-on: ubuntu-latest - environment: Production + environment: $ENVIRONMENT steps: - name: Checkout uses: actions/checkout@v4 diff --git a/.github/workflows/readme.yaml b/.github/workflows/readme.yaml index fa2669a..4352cd4 100644 --- a/.github/workflows/readme.yaml +++ b/.github/workflows/readme.yaml @@ -1,15 +1,14 @@ name: Sync OAS to ReadMe on: push: - branches: - - main + env: ENVIRONMENT: ${{ github.ref == 'refs/heads/main' && 'Production' || 'Sandbox' }} jobs: rdme-openapi: runs-on: ubuntu-latest - environment: $ENVIRONMENT + environment: ${{ env.ENVIRONMENT }} steps: - name: Checkout uses: actions/checkout@v4