From f39f789a6627395c34b19ca4d1eebc390b05b46c Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 26 Sep 2022 15:45:14 +0100 Subject: [PATCH 1/2] remove install pro and add protection to single image build to fail off master --- .github/workflows/deploy-single-image.yml | 9 ++++++--- .github/workflows/release-selfhost.yml | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy-single-image.yml b/.github/workflows/deploy-single-image.yml index 8bf8f232c5..9c0582c258 100644 --- a/.github/workflows/deploy-single-image.yml +++ b/.github/workflows/deploy-single-image.yml @@ -4,7 +4,7 @@ on: workflow_dispatch: env: - BASE_BRANCH: ${{ github.event.pull_request.base.ref}} + BASE_BRANCH: ${{ github.event.pull_request.base.ref }} BRANCH: ${{ github.event.pull_request.head.ref }} CI: true PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }} @@ -17,6 +17,11 @@ jobs: matrix: node-version: [14.x] steps: + - name: Fail if branch is not master + if: github.ref != 'refs/heads/master' + run: | + echo "Ref is not master, you must run this job from master." + exit 1 - name: "Checkout" uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} @@ -28,8 +33,6 @@ jobs: - name: Setup Docker Buildx id: buildx uses: docker/setup-buildx-action@v1 - - name: Install Pro - run: yarn install:pro $BRANCH $BASE_BRANCH - name: Run Yarn run: yarn - name: Run Yarn Bootstrap diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml index da064f3e32..1e9f8a5ede 100644 --- a/.github/workflows/release-selfhost.yml +++ b/.github/workflows/release-selfhost.yml @@ -54,9 +54,6 @@ jobs: DOCKER_PASSWORD: ${{ secrets.DOCKER_API_KEY }} SELFHOST_TAG: latest - - name: Install Pro - run: yarn install:pro $BRANCH $BASE_BRANCH - - name: Bootstrap and build (CLI) run: | yarn From 30ccf00232bc4bd070bf64dbd2c677f5810412d2 Mon Sep 17 00:00:00 2001 From: Martin McKeaveney Date: Mon, 26 Sep 2022 15:52:01 +0100 Subject: [PATCH 2/2] remove superfluous env vars --- .github/workflows/deploy-single-image.yml | 2 -- .github/workflows/release-selfhost.yml | 4 ---- 2 files changed, 6 deletions(-) diff --git a/.github/workflows/deploy-single-image.yml b/.github/workflows/deploy-single-image.yml index 9c0582c258..cd16574eea 100644 --- a/.github/workflows/deploy-single-image.yml +++ b/.github/workflows/deploy-single-image.yml @@ -4,8 +4,6 @@ on: workflow_dispatch: env: - BASE_BRANCH: ${{ github.event.pull_request.base.ref }} - BRANCH: ${{ github.event.pull_request.head.ref }} CI: true PERSONAL_ACCESS_TOKEN : ${{ secrets.PERSONAL_ACCESS_TOKEN }} REGISTRY_URL: registry.hub.docker.com diff --git a/.github/workflows/release-selfhost.yml b/.github/workflows/release-selfhost.yml index 1e9f8a5ede..d78180fdc7 100644 --- a/.github/workflows/release-selfhost.yml +++ b/.github/workflows/release-selfhost.yml @@ -3,10 +3,6 @@ name: Budibase Release Selfhost on: workflow_dispatch: -env: - BRANCH: ${{ github.event.pull_request.head.ref }} - BASE_BRANCH: ${{ github.event.pull_request.base.ref}} - jobs: release: runs-on: ubuntu-latest