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
committerMichaël Zasso <targos@protonmail.com>2021-06-11 10:30:12 +0300
commitd13508d21945fb3bcbc2f90d2e713cf9e8e23454 (patch)
tree74fb34f080f3a759b67b29c8cc14eb3072b73a48 /.github
parentdc67fec1b464aff9af8ff204ba536297adaca443 (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/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
9 files changed, 12 insertions, 6 deletions
diff --git a/.github/workflows/build-tarball.yml b/.github/workflows/build-tarball.yml
index 7e91c8fd007..8a3daa70588 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 8765d2d8d5c..139ecf7c71f 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/linters.yml b/.github/workflows/linters.yml
index 06bf14ccc20..89371bcb556 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 108511ba78c..b8f403fd7d6 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 b66e41273f4..7b0c135f0a0 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 41f86d85a48..651152f8cfe 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 7021ada45ad..20fdd7f9876 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