Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tools: make GH Actions workflows work if default branch is not master #38516

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build-tarball.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- main
- v[0-9]+.x-staging
- v[0-9]+.x

1 change: 1 addition & 0 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
8 changes: 3 additions & 5 deletions .github/workflows/commit-queue.yml
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ jobs:
# See https://github.com/nodejs/node-core-utils/pull/486
fetch-depth: 0
# A personal token is required because pushing with GITHUB_TOKEN will
# prevent commits from running CI after they land on master. It needs
# prevent commits from running CI after they land. It needs
# to be set here because `checkout` configures GitHub authentication
# for push as well.
token: ${{ secrets.GH_USER_TOKEN }}
@@ -63,15 +63,13 @@ jobs:
owner: ${{ env.OWNER }}
repo: ${{ env.REPOSITORY }}
# Commit queue is only enabled for the default branch on the repository
# TODO(mmarchini): get the default branch programmatically instead of
# assuming `master`
base_ref: "master"
base_ref: ${{ github.repository.default_branch }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Configure node-core-utils
run: |
ncu-config set branch master
ncu-config set branch ${{ github.repository.default_branch }}
ncu-config set upstream origin
ncu-config set username "${{ secrets.GH_USER_NAME }}"
ncu-config set token "${{ secrets.GH_USER_TOKEN }}"
1 change: 1 addition & 0 deletions .github/workflows/coverage-linux.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ on:
push:
branches:
- master
- main
paths-ignore:
- 'doc/**'
- 'deps/**'
1 change: 1 addition & 0 deletions .github/workflows/coverage-windows.yml
Original file line number Diff line number Diff line change
@@ -10,6 +10,7 @@ on:
push:
branches:
- master
- main
paths-ignore:
- 'doc/**'
- 'deps/**'
1 change: 1 addition & 0 deletions .github/workflows/linters.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- main
- v[0-9]+.x-staging
- v[0-9]+.x

1 change: 1 addition & 0 deletions .github/workflows/misc.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- main
- v[0-9]+.x-staging
- v[0-9]+.x

3 changes: 2 additions & 1 deletion .github/workflows/notify-force-push.yml
Original file line number Diff line number Diff line change
@@ -2,6 +2,7 @@ on:
push:
branches:
- master
- main

name: Notify on Force Push
jobs:
@@ -17,7 +18,7 @@ jobs:
SLACK_ICON: https://github.com/nodejs.png?size=48
SLACK_TITLE: '${{ github.actor }} force-pushed to ${{ github.ref }}'
SLACK_MESSAGE: |
A commit was force-pushed to <https://github.com/${{ github.repository }}/tree/master|${{ github.repository }}@master> by <https://github.com/${{ github.actor }}|${{ github.actor }}>
A commit was force-pushed to <https://github.com/${{ github.repository }}/tree/${{ github.repository.default_branch }}|${{ github.repository }}@${{ github.repository.default_branch }}> by <https://github.com/${{ github.actor }}|${{ github.actor }}>
Before: <https://github.com/${{ github.repository }}/commit/${{ github.event.before }}|${{ github.event.before }}>
After: <https://github.com/${{ github.repository }}/commit/${{ github.event.after }}|${{ github.event.after }}>
1 change: 1 addition & 0 deletions .github/workflows/test-asan.yml
Original file line number Diff line number Diff line change
@@ -4,6 +4,7 @@ on:
push:
branches:
- master
- main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
1 change: 1 addition & 0 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
- main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
1 change: 1 addition & 0 deletions .github/workflows/test-macos.yml
Original file line number Diff line number Diff line change
@@ -7,6 +7,7 @@ on:
push:
branches:
- master
- main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x