Unverified Commit 7ce4a02b authored by Leah's avatar Leah Committed by GitHub

ci: don't try to upload to datadog for docs only changes (#59068)

parent 5b94850d
This diff is collapsed.
......@@ -25,14 +25,6 @@ on:
required: false
description: 'whether to upload analyzer artifacts'
type: string
skipForDocsOnly:
required: false
description: 'skip for docs only changes'
type: string
skipForRelease:
required: false
description: 'skip for release'
type: string
nodeVersion:
required: false
description: 'version of Node.js to use'
......@@ -132,28 +124,15 @@ jobs:
- run: cargo clean
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
- run: node scripts/normalize-version-bump.js
name: normalize versions
- 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
if: ${{ inputs.uploadSwcArtifact == 'yes' && steps.docs-change.outputs.DOCS_CHANGE == 'nope' }}
if: ${{ inputs.uploadSwcArtifact == 'yes' }}
uses: actions/upload-artifact@v3
with:
name: next-swc-binary
......@@ -178,7 +157,6 @@ jobs:
- run: turbo run get-test-timings -- --build ${{ github.sha }}
- 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
uses: actions/upload-artifact@v3
......
......@@ -60,9 +60,8 @@ async function main() {
const remoteUrl =
eventData?.head?.repo?.full_name ||
process.env.GITHUB_REPOSITORY ||
(await exec('git remote get-url origin').stdout)
(await exec('git remote get-url origin')).stdout
let changedFilesOutput = ''
const isCanary =
branchName.trim() === 'canary' && remoteUrl.includes('vercel/next.js')
......@@ -85,7 +84,7 @@ async function main() {
}
)
console.error({ branchName, remoteUrl, isCanary, changesResult })
changedFilesOutput = changesResult.stdout
const changedFilesOutput = changesResult.stdout
const typeIndex = process.argv.indexOf('--type')
const type = typeIndex > -1 && process.argv[typeIndex + 1]
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment