Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntoine du Hamel <duhamelantoine1995@gmail.com>2021-05-03 11:59:10 +0300
committerJames M Snell <jasnell@gmail.com>2021-05-04 23:21:20 +0300
commitb0341512b840ba0ada0194a8da4228edffbfe5e8 (patch)
treef3ca6b8cda0044bb0a01b0135d4373b4123fc70a /.github
parentf9d6de41a7cb7e512eab4e8ed9b9a5dbfbac11e2 (diff)
tools: make GH Actions workflows work if default branch is not master
PR-URL: https://github.com/nodejs/node/pull/38516 Reviewed-By: Michaƫl Zasso <targos@protonmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Mary Marchini <oss@mmarchini.me>
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build-tarball.yml1
-rw-r--r--.github/workflows/build-windows.yml1
-rw-r--r--.github/workflows/commit-queue.yml8
-rw-r--r--.github/workflows/coverage-linux.yml1
-rw-r--r--.github/workflows/coverage-windows.yml1
-rw-r--r--.github/workflows/linters.yml1
-rw-r--r--.github/workflows/misc.yml1
-rw-r--r--.github/workflows/notify-force-push.yml3
-rw-r--r--.github/workflows/test-asan.yml1
-rw-r--r--.github/workflows/test-linux.yml1
-rw-r--r--.github/workflows/test-macos.yml1
11 files changed, 14 insertions, 6 deletions
diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml
index 226dc69f0e9..1f802ca12b5 100644
--- a/.github/workflows/build-tarball.yml
+++ b/.github/workflows/build-tarball.yml
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
+ - main
- v[0-9]+.x-staging
- v[0-9]+.x
diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml
index d3e1e433924..dea275876ea 100644
--- a/.github/workflows/build-windows.yml
+++ b/.github/workflows/build-windows.yml
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
+ - main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
diff --git a/.github/workflows/commit-queue.yml b/.github/workflows/commit-queue.yml
index 5b36a358c61..50d729aab55 100644
--- a/.github/workflows/commit-queue.yml
+++ b/.github/workflows/commit-queue.yml
@@ -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 }}"
diff --git a/.github/workflows/coverage-linux.yml b/.github/workflows/coverage-linux.yml
index 75f296230df..62881f63724 100644
--- a/.github/workflows/coverage-linux.yml
+++ b/.github/workflows/coverage-linux.yml
@@ -10,6 +10,7 @@ on:
push:
branches:
- master
+ - main
paths-ignore:
- 'doc/**'
- 'deps/**'
diff --git a/.github/workflows/coverage-windows.yml b/.github/workflows/coverage-windows.yml
index ac809f3f0be..5387688e3c2 100644
--- a/.github/workflows/coverage-windows.yml
+++ b/.github/workflows/coverage-windows.yml
@@ -10,6 +10,7 @@ on:
push:
branches:
- master
+ - main
paths-ignore:
- 'doc/**'
- 'deps/**'
diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml
index 1b0f8c868db..1fdcd6059bb 100644
--- a/.github/workflows/linters.yml
+++ b/.github/workflows/linters.yml
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
+ - main
- v[0-9]+.x-staging
- v[0-9]+.x
diff --git a/.github/workflows/misc.yml b/.github/workflows/misc.yml
index 83c65225f0a..6167af045f0 100644
--- a/.github/workflows/misc.yml
+++ b/.github/workflows/misc.yml
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
+ - main
- v[0-9]+.x-staging
- v[0-9]+.x
diff --git a/.github/workflows/notify-force-push.yml b/.github/workflows/notify-force-push.yml
index 079141bba2a..e3bdc0353c6 100644
--- a/.github/workflows/notify-force-push.yml
+++ b/.github/workflows/notify-force-push.yml
@@ -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 }}>
diff --git a/.github/workflows/test-asan.yml b/.github/workflows/test-asan.yml
index 9e6192c32a3..d6dd1b7b7ec 100644
--- a/.github/workflows/test-asan.yml
+++ b/.github/workflows/test-asan.yml
@@ -4,6 +4,7 @@ on:
push:
branches:
- master
+ - main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml
index 41968139816..b191deb806e 100644
--- a/.github/workflows/test-linux.yml
+++ b/.github/workflows/test-linux.yml
@@ -5,6 +5,7 @@ on:
push:
branches:
- master
+ - main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x
diff --git a/.github/workflows/test-macos.yml b/.github/workflows/test-macos.yml
index 5f516608c26..725a3e4a8c9 100644
--- a/.github/workflows/test-macos.yml
+++ b/.github/workflows/test-macos.yml
@@ -7,6 +7,7 @@ on:
push:
branches:
- master
+ - main
- canary
- v[0-9]+.x-staging
- v[0-9]+.x