From 23f21434fff03c9beedba90628908624e18a9abb Mon Sep 17 00:00:00 2001 From: Aakansha Doshi Date: Wed, 16 Dec 2020 20:19:05 +0530 Subject: [PATCH] Fix changelog workflow (#2604) Fix the workflow to make sure it runs on pull requests against forked branches and also don't run on l10_master and dependabot branches --- .github/workflows/changelog-check.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/changelog-check.yml b/.github/workflows/changelog-check.yml index 087a2d0b..717188a3 100644 --- a/.github/workflows/changelog-check.yml +++ b/.github/workflows/changelog-check.yml @@ -2,24 +2,26 @@ name: Changelog in sync for packages on: push: - branches-ignore: - - "l10n_master" - - "dependabot/**" + branches: + - master + pull_request: jobs: test: runs-on: ubuntu-latest steps: - uses: actions/checkout@v1 - - name: Setup Node.js 14.x uses: actions/setup-node@v1 with: node-version: 14.x - - name: Install and run changelog check - run: | - npm ci - npm run changelog:check + run: + if [[ $GITHUB_HEAD_REF =~ dependabot || $GITHUB_HEAD_REF == "l10n_master" ]]; then + echo "Skipping running changelog check"; + else + npm ci; + npm run changelog:check; + fi env: CI: true