From 581713af3d5588838b30cfcda16f68f2e461721f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zo=C3=A9=20Cox?= Date: Sun, 18 Feb 2024 00:22:36 +0100 Subject: [PATCH 1/2] update renovate config --- .github/workflows/main.yml | 5 +++-- renovate.json | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1d733d24..723d7224 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,6 +7,7 @@ on: push: branches: - main + - renovate/** # support automergeType=branch jobs: build: @@ -18,14 +19,14 @@ jobs: node-version: 20.x cache: yarn - run: yarn install --frozen-lockfile - - run: yarn lint-no-fix - - run: yarn typecheck - run: yarn sync - run: yarn build - name: Prepare Netlify dependencies run: npm install netlify-cli -g + if: github.ref == 'refs/heads/main' # do not publish renovate branches - name: Deploy to Netlify env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: sequelize-site run: netlify deploy --dir build --prod --message '${{ github.event.commits[0].message }}' + if: github.ref == 'refs/heads/main' # do not publish renovate branches diff --git a/renovate.json b/renovate.json index 91b39475..5d91a10c 100644 --- a/renovate.json +++ b/renovate.json @@ -6,6 +6,7 @@ ":semanticCommitScopeDisabled" ], "automergeStrategy": "squash", + "automergeType": "branch", "semanticCommitType": "meta", "ignorePaths": ["static/"], "packageRules": [ From d8ccf9adebb2a3405633e794d0369de6a9a86664 Mon Sep 17 00:00:00 2001 From: Alyx Date: Thu, 11 Apr 2024 22:25:46 +0200 Subject: [PATCH 2/2] update logic --- .github/workflows/draft.yml | 11 +++++++---- .github/workflows/main.yml | 3 --- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/draft.yml b/.github/workflows/draft.yml index 239a5732..0e55f291 100644 --- a/.github/workflows/draft.yml +++ b/.github/workflows/draft.yml @@ -3,6 +3,9 @@ on: pull_request: branches: - main + push: + branches: + - renovate/** # support automergeType=branch # This configuration cancels previous runs if a new run is started on the same PR. Only one run at a time per PR. # From https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-a-fallback-value @@ -25,7 +28,7 @@ jobs: - run: yarn sync - run: yarn build - name: Deploy to Draft to Netlify - if: '! github.event.pull_request.head.repo.fork' + if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/renovate') }} id: deployment env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} @@ -35,13 +38,13 @@ jobs: netlify deploy --dir build --message '${{ github.event.commits[0].message }}' > log.tmp.txt 2>&1 cat log.tmp.txt | grep -E 'Website draft URL:' > log.txt - name: Read deployment log - if: '! github.event.pull_request.head.repo.fork' + if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/renovate') }} id: logs uses: juliangruber/read-file-action@v1 with: path: log.txt - name: Comment PR with draft publish logs - if: '! github.event.pull_request.head.repo.fork' + if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/renovate') }} id: create-comment uses: peter-evans/create-or-update-comment@v4 with: @@ -49,6 +52,6 @@ jobs: body: | ${{ steps.logs.outputs.content }} - name: Comment debug - if: '! github.event.pull_request.head.repo.fork' + if: ${{ !github.event.pull_request.head.repo.fork && !startsWith(github.ref, 'refs/heads/renovate') }} run: | echo "Comment ID - ${{ steps.create-comment.outputs.comment-id }}" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2a4e7a03..b6b5c2ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,7 +7,6 @@ on: push: branches: - main - - renovate/** # support automergeType=branch jobs: build: @@ -25,10 +24,8 @@ jobs: - run: yarn build - name: Prepare Netlify dependencies run: npm install netlify-cli -g - if: github.ref == 'refs/heads/main' # do not publish renovate branches - name: Deploy to Netlify env: NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} NETLIFY_SITE_ID: sequelize-site run: netlify deploy --dir build --prod --message '${{ github.event.commits[0].message }}' - if: github.ref == 'refs/heads/main' # do not publish renovate branches