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: ...@@ -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
......
...@@ -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 const changedFilesOutput = 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]
......
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