From 546316b3d6304cf06e81ed0d17d1d4f4f7bb38d9 Mon Sep 17 00:00:00 2001 From: martincostello Date: Thu, 4 Jan 2024 10:44:05 +0000 Subject: [PATCH] Run workflows on release branches - Allow workflows to run on `release/*` branches where appropriate. - Remove redundant `if` condition escaping. --- .github/workflows/actions-lint.yml | 10 +++++----- .github/workflows/build.yml | 4 ++-- .github/workflows/codeql-analysis.yml | 4 ++-- .github/workflows/dependabot-approve.yml | 2 +- .github/workflows/dependency-review.yml | 4 ++-- .github/workflows/gh-pages.yml | 4 ++-- .github/workflows/updater-approve.yml | 8 ++++---- 7 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/actions-lint.yml b/.github/workflows/actions-lint.yml index 92f61d861a3..4cefcb7b33b 100644 --- a/.github/workflows/actions-lint.yml +++ b/.github/workflows/actions-lint.yml @@ -2,13 +2,13 @@ name: actions-lint on: push: - branches: [ main ] + branches: [ main, release/* ] paths-ignore: - - '**/*.gitattributes' - - '**/*.gitignore' - - '**/*.md' + - '**/*.gitattributes' + - '**/*.gitignore' + - '**/*.md' pull_request: - branches: [ main ] + branches: [ main, release/* ] workflow_dispatch: permissions: diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 58b81feee90..f470fb5c536 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,10 +2,10 @@ name: build on: push: - branches: [ main ] + branches: [ main, release/* ] tags: [ '*' ] pull_request: - branches: [ main ] + branches: [ main, release/* ] workflow_dispatch: env: diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 01fcb3abcc6..c8b6704bcc3 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -2,9 +2,9 @@ name: code-scan on: push: - branches: [ main ] + branches: [ main, release/* ] pull_request: - branches: [ main ] + branches: [ main, release/* ] schedule: - cron: '0 8 * * MON' workflow_dispatch: diff --git a/.github/workflows/dependabot-approve.yml b/.github/workflows/dependabot-approve.yml index a2283901770..e1a60b8e9ee 100644 --- a/.github/workflows/dependabot-approve.yml +++ b/.github/workflows/dependabot-approve.yml @@ -8,7 +8,7 @@ permissions: jobs: review: runs-on: ubuntu-latest - if: ${{ github.event.repository.fork == false && github.event.pull_request.user.login == 'dependabot[bot]' }} + if: github.event.repository.fork == false && github.event.pull_request.user.login == 'dependabot[bot]' steps: diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml index d3fbccaeff5..da04d9d1b7a 100644 --- a/.github/workflows/dependency-review.yml +++ b/.github/workflows/dependency-review.yml @@ -2,7 +2,7 @@ name: dependency-review on: pull_request: - branches: [ main ] + branches: [ main, release/* ] permissions: contents: read @@ -10,7 +10,7 @@ permissions: jobs: dependency-review: runs-on: ubuntu-latest - if: ${{ github.event.repository.fork == false }} + if: github.event.repository.fork == false steps: diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 1e31e51799e..cfeada4bf9b 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -2,9 +2,9 @@ name: github-pages on: push: - branches: [ main ] + branches: [ main, release/* ] pull_request: - branches: [ main ] + branches: [ main, release/* ] workflow_dispatch: permissions: diff --git a/.github/workflows/updater-approve.yml b/.github/workflows/updater-approve.yml index fa9257ee403..287704c4148 100644 --- a/.github/workflows/updater-approve.yml +++ b/.github/workflows/updater-approve.yml @@ -2,7 +2,7 @@ name: updater-approve on: pull_request: - branches: [ main ] + branches: [ main, release/* ] permissions: contents: read @@ -10,7 +10,7 @@ permissions: jobs: review: runs-on: ubuntu-latest - if: ${{ github.event.repository.fork == false && github.event.pull_request.user.login == 'polly-updater-bot[bot]' }} + if: github.event.repository.fork == false && github.event.pull_request.user.login == 'polly-updater-bot[bot]' env: REVIEWER_LOGIN: "polly-reviewer-bot[bot]" @@ -98,7 +98,7 @@ jobs: uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - name: Approve pull request and enable auto-merge - if: ${{ steps.check-dependencies.outputs.is-trusted-update == 'true' }} + if: steps.check-dependencies.outputs.is-trusted-update == 'true' env: GH_TOKEN: ${{ steps.generate-application-token.outputs.token }} PR_URL: ${{ github.event.pull_request.html_url }} @@ -118,7 +118,7 @@ jobs: } - name: Disable auto-merge and dismiss approvals - if: ${{ steps.check-dependencies.outputs.is-trusted-update != 'true' }} + if: steps.check-dependencies.outputs.is-trusted-update != 'true' env: GH_TOKEN: ${{ steps.generate-application-token.outputs.token }} PR_URL: ${{ github.event.pull_request.html_url }}