Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
7ce4a02b
Unverified
Commit
7ce4a02b
authored
Nov 29, 2023
by
Leah
Committed by
GitHub
Nov 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci: don't try to upload to datadog for docs only changes (#59068)
parent
5b94850d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
81 additions
and
61 deletions
+81
-61
build_and_test.yml
.github/workflows/build_and_test.yml
+77
-34
build_reusable.yml
.github/workflows/build_reusable.yml
+2
-24
run-for-change.js
scripts/run-for-change.js
+2
-3
No files found.
.github/workflows/build_and_test.yml
View file @
7ce4a02b
This diff is collapsed.
Click to expand it.
.github/workflows/build_reusable.yml
View file @
7ce4a02b
...
@@ -25,14 +25,6 @@ on:
...
@@ -25,14 +25,6 @@ on:
required
:
false
required
:
false
description
:
'
whether
to
upload
analyzer
artifacts'
description
:
'
whether
to
upload
analyzer
artifacts'
type
:
string
type
:
string
skipForDocsOnly
:
required
:
false
description
:
'
skip
for
docs
only
changes'
type
:
string
skipForRelease
:
required
:
false
description
:
'
skip
for
release'
type
:
string
nodeVersion
:
nodeVersion
:
required
:
false
required
:
false
description
:
'
version
of
Node.js
to
use'
description
:
'
version
of
Node.js
to
use'
...
@@ -132,28 +124,15 @@ jobs:
...
@@ -132,28 +124,15 @@ jobs:
-
run
:
cargo clean
-
run
:
cargo clean
if
:
${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
if
:
${{ inputs.skipNativeBuild != 'yes' || inputs.needsNextest == 'yes' || inputs.needsRust == 'yes' }}
-
run
:
echo "DOCS_CHANGE<<EOF" >> $GITHUB_OUTPUT; echo "$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT; echo 'EOF' >> $GITHUB_OUTPUT
name
:
check docs only change
id
:
docs-change
-
id
:
is-release
run
:
|
if [[ $(node ./scripts/check-is-release.js 2> /dev/null || :) = v* ]];
then
echo "IS_RELEASE=yes" >> $GITHUB_OUTPUT
else
echo "IS_RELEASE=nope" >> $GITHUB_OUTPUT
fi
# normalize versions before build-native for better cache hits
# normalize versions before build-native for better cache hits
-
run
:
node scripts/normalize-version-bump.js
-
run
:
node scripts/normalize-version-bump.js
name
:
normalize versions
name
:
normalize versions
-
run
:
turbo run build-native-release -vvv --remote-cache-timeout 90 --summarize -- --target x86_64-unknown-linux-gnu
-
run
:
turbo run build-native-release -vvv --remote-cache-timeout 90 --summarize -- --target x86_64-unknown-linux-gnu
if
:
${{ inputs.skipNativeBuild != 'yes'
&& steps.docs-change.outputs.DOCS_CHANGE == 'nope'
}}
if
:
${{ inputs.skipNativeBuild != 'yes' }}
-
name
:
Upload next-swc artifact
-
name
:
Upload next-swc artifact
if
:
${{ inputs.uploadSwcArtifact == 'yes'
&& steps.docs-change.outputs.DOCS_CHANGE == 'nope'
}}
if
:
${{ inputs.uploadSwcArtifact == 'yes' }}
uses
:
actions/upload-artifact@v3
uses
:
actions/upload-artifact@v3
with
:
with
:
name
:
next-swc-binary
name
:
next-swc-binary
...
@@ -178,7 +157,6 @@ jobs:
...
@@ -178,7 +157,6 @@ jobs:
-
run
:
turbo run get-test-timings -- --build ${{ github.sha }}
-
run
:
turbo run get-test-timings -- --build ${{ github.sha }}
-
run
:
/bin/bash -c "${{ inputs.afterBuild }}"
-
run
:
/bin/bash -c "${{ inputs.afterBuild }}"
if
:
${{(inputs.skipForDocsOnly != 'yes' || steps.docs-change.outputs.DOCS_CHANGE == 'nope') && (inputs.skipForRelease != 'yes' || steps.is-release.outputs.IS_RELEASE == 'nope')}}
-
name
:
Upload artifact
-
name
:
Upload artifact
uses
:
actions/upload-artifact@v3
uses
:
actions/upload-artifact@v3
...
...
scripts/run-for-change.js
View file @
7ce4a02b
...
@@ -60,9 +60,8 @@ async function main() {
...
@@ -60,9 +60,8 @@ async function main() {
const
remoteUrl
=
const
remoteUrl
=
eventData
?.
head
?.
repo
?.
full_name
||
eventData
?.
head
?.
repo
?.
full_name
||
process
.
env
.
GITHUB_REPOSITORY
||
process
.
env
.
GITHUB_REPOSITORY
||
(
await
exec
(
'git remote get-url origin'
)
.
stdout
)
(
await
exec
(
'git remote get-url origin'
)
).
stdout
let
changedFilesOutput
=
''
const
isCanary
=
const
isCanary
=
branchName
.
trim
()
===
'canary'
&&
remoteUrl
.
includes
(
'vercel/next.js'
)
branchName
.
trim
()
===
'canary'
&&
remoteUrl
.
includes
(
'vercel/next.js'
)
...
@@ -85,7 +84,7 @@ async function main() {
...
@@ -85,7 +84,7 @@ async function main() {
}
}
)
)
console
.
error
({
branchName
,
remoteUrl
,
isCanary
,
changesResult
})
console
.
error
({
branchName
,
remoteUrl
,
isCanary
,
changesResult
})
changedFilesOutput
=
changesResult
.
stdout
c
onst
c
hangedFilesOutput
=
changesResult
.
stdout
const
typeIndex
=
process
.
argv
.
indexOf
(
'--type'
)
const
typeIndex
=
process
.
argv
.
indexOf
(
'--type'
)
const
type
=
typeIndex
>
-
1
&&
process
.
argv
[
typeIndex
+
1
]
const
type
=
typeIndex
>
-
1
&&
process
.
argv
[
typeIndex
+
1
]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment