Skip to content

Commit e130f4b

Browse files
authored
[feature] Skip changelong not develop @W-17704536@ (#2257) (#2258)
* Skip the CHANGELOG check github action when not on `develop` branch @W-17704536@ * meaningless whitespace commit to trigger github actions CI * Add auto-pass CI check behavior to satisfy other jobs with `depends-on: changelog-check` * ensure changelog-check always runs * add a whitespace change to the allow-listed PUBLIC_PACKAGES to validate PR check functionality https://github.com/SalesforceCommerceCloud/pwa-kit/blob/develop/.github/actions/changelog-check/action.yml#L58 * roll back demonstrative change
1 parent 2cb9c0e commit e130f4b

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,27 @@ on:
2222
schedule:
2323
# Run every day at 12am (PST) - cron uses UTC times
2424
- cron: '0 8 * * *'
25+
2526
env:
2627
IS_NOT_FORK: ${{ github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository }}
2728
DEVELOP: ${{ (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && (github.head_ref || github.ref_name) == 'develop' }}
2829
RELEASE: ${{ (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository) && startsWith(github.head_ref || github.ref_name, 'release-') }}
2930

3031
jobs:
3132
changelog-check:
33+
if: (github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository)
3234
runs-on: ubuntu-latest
3335
steps:
36+
- name: Auto-pass for non-PR events
37+
if: env.DEVELOP == 'true'
38+
run: exit 0
39+
3440
- name: Checkout
41+
if: env.DEVELOP != 'true'
3542
uses: actions/checkout@v4
3643

3744
- name: Changelog Check
45+
if: env.DEVELOP != 'true'
3846
uses: ./.github/actions/changelog-check
3947
with:
4048
pr_number: ${{ github.event.pull_request.number }}

0 commit comments

Comments
 (0)