From 1b4ed3adbaf97e79464a86623574bb41155827f2 Mon Sep 17 00:00:00 2001 From: Joeri de Gooijer Date: Tue, 3 Sep 2024 12:05:57 -0700 Subject: [PATCH] Run builds on every push, but push to Production or Sandbox --- .github/workflows/postman.yaml | 8 +++++--- .github/workflows/readme.yaml | 5 ++--- 2 files changed, 7 insertions(+), 6 deletions(-) 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