diff --git a/.github/workflows/enforcer.yaml b/.github/workflows/enforcer.yaml new file mode 100644 index 0000000..fbee4f9 --- /dev/null +++ b/.github/workflows/enforcer.yaml @@ -0,0 +1,15 @@ +name: 'Check Branch' + +on: + pull_request: + merge_group: + +jobs: + check_branch: + runs-on: ubuntu-latest + steps: + - name: Check branch + if: github.base_ref == 'main' && github.head_ref != 'dev' + run: | + echo "ERROR: You can only merge to main from dev." + exit 1 diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml index e5befc0..84d33f9 100644 --- a/.github/workflows/pipeline.yml +++ b/.github/workflows/pipeline.yml @@ -96,7 +96,6 @@ jobs: GOOGLE_CLIENT_SECRET: ${{ github.ref_name == 'main' && secrets.PROD_GOOGLE_CLIENT_SECRET || secrets.STAGING_GOOGLE_CLIENT_SECRET }} ADMIN_EMAILS: ${{ vars.ADMIN_EMAILS }} - WASP_SERVER_URL: ${{ github.ref_name == 'main' && vars.PROD_WASP_SERVER_URL || vars.STAGING_WASP_SERVER_URL }} ADS_SERVER_URL: ${{ github.ref_name == 'main' && vars.PROD_ADS_SERVER_URL || vars.STAGING_ADS_SERVER_URL }} BACKEND_DOMAIN: ${{ github.ref_name == 'main' && vars.PROD_BACKEND_DOMAIN || vars.STAGING_BACKEND_DOMAIN }} WASP_WEB_CLIENT_URL: ${{ github.ref_name == 'main' && vars.PROD_WASP_WEB_CLIENT_URL || vars.STAGING_WASP_WEB_CLIENT_URL }}