Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate set-output usage to $GITHB_OUTPUT #44757

Merged
merged 3 commits into from
Jan 10, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Migrate set-output usage to $GITHB_OUTPUT
  • Loading branch information
ijjk committed Jan 10, 2023
commit f06f83f5129513a502186307a6b0be71df84502f
28 changes: 14 additions & 14 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,23 +54,23 @@ jobs:
run: sudo ethtool -K eth0 tx off rx off

- name: Check non-docs only change
run: echo "::set-output name=DOCS_CHANGE::$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')"
run: echo "DOCS_CHANGE=$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT
id: docs-change

- run: echo ${{steps.docs-change.outputs.DOCS_CHANGE}}

- run: echo "::set-output name=SWC_CHANGE::$(node scripts/run-for-change.js --type next-swc --exec echo 'yup')"
- run: echo "SWC_CHANGE=$(node scripts/run-for-change.js --type next-swc --exec echo 'yup')" >> $GITHUB_OUTPUT
id: swc-change

- run: echo "::set-output name=TURBO_TOKEN::$(echo ${TURBO_TOKEN:-empty})"
- run: echo "TURBO_TOKEN=$(echo ${TURBO_TOKEN:-empty})" >> $GITHUB_OUTPUT
id: turbo-token

- run: echo ${{steps.swc-change.outputs.SWC_CHANGE}}

- run: npm i -g pnpm@${PNPM_VERSION}

- id: get-store-path
run: echo ::set-output name=STORE_PATH::$(pnpm store path)
run: echo STORE_PATH=$(pnpm store path) >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: cache-pnpm-store
Expand All @@ -89,13 +89,13 @@ jobs:
run: |
if [[ $(node ./scripts/check-is-release.js 2> /dev/null || :) = v* ]];
then
echo "::set-output name=IS_RELEASE::true"
echo "IS_RELEASE=true" >> $GITHUB_OUTPUT
else
echo "::set-output name=IS_RELEASE::false"
echo "IS_RELEASE=false" >> $GITHUB_OUTPUT
fi
# We use week in the turbo cache key to keep the cache from infinitely growing
- id: get-week
run: echo ::set-output name=WEEK::$(date +%U)
run: echo "WEEK=$(date +%U)" >> $GITHUB_OUTPUT

- uses: actions/cache@v3
id: cache-build
Expand Down Expand Up @@ -134,7 +134,7 @@ jobs:
path: ./*
key: ${{ github.sha }}-${{ github.run_number }}

- run: echo "::set-output name=SWC_CHANGE::$(node scripts/run-for-change.js --type next-swc --exec echo 'yup')"
- run: echo "SWC_CHANGE=$(node scripts/run-for-change.js --type next-swc --exec echo 'yup')" >> $GITHUB_OUTPUT
id: swc-change

- run: echo ${{ steps.swc-change.outputs.SWC_CHANGE }}
Expand Down Expand Up @@ -506,7 +506,7 @@ jobs:
name: next-swc-test-binary
path: packages/next-swc/native

- run: echo "::set-output name=CNA_CHANGE::$(node scripts/run-for-change.js --type cna --always-canary --exec echo 'yup')"
- run: echo "CNA_CHANGE=$(node scripts/run-for-change.js --type cna --always-canary --exec echo 'yup')" >> $GITHUB_OUTPUT
id: cna-change

- run: docker run --rm -v $(pwd):/work mcr.microsoft.com/playwright:v1.28.1-focal /bin/bash -c "cd /work && ls && curl https://install-node.vercel.app/v16 | FORCE=1 bash && node -v && npm i -g pnpm@${PNPM_VERSION} && xvfb-run node run-tests.js test/integration/create-next-app/index.test.ts test/integration/create-next-app/templates.test.ts >> /proc/1/fd/1"
Expand Down Expand Up @@ -915,7 +915,7 @@ jobs:
with:
fetch-depth: 25

- run: echo "::set-output name=DOCS_CHANGE::$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')"
- run: echo "DOCS_CHANGE=$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT
id: docs-change

- name: Cache cargo registry
Expand All @@ -934,7 +934,7 @@ jobs:

# We use week in the turbo cache key to keep the cache from infinitely growing
- id: get-week
run: echo ::set-output name=WEEK::$(date +%U)
run: echo "WEEK=$(date +%U)" >> $GITHUB_OUTPUT

- name: Turbo Cache
id: turbo-cache
Expand Down Expand Up @@ -1002,7 +1002,7 @@ jobs:
with:
fetch-depth: 25

- run: echo "::set-output name=SWC_CHANGE::$(node scripts/run-for-change.js --type next-swc --exec echo 'yup')"
- run: echo "SWC_CHANGE=$(node scripts/run-for-change.js --type next-swc --exec echo 'yup')" >> $GITHUB_OUTPUT
id: swc-change

- run: echo ${{ steps.swc-change.outputs.SWC_CHANGE }}
Expand Down Expand Up @@ -1308,7 +1308,7 @@ jobs:
- run: node ./scripts/pull-freebsd-cache.js

- name: check build exists
run: if [ -f packages/next-swc/native/next-swc.freebsd-x64.node ]; then echo "::set-output name=BUILD_EXISTS::yes"; else echo "::set-output name=BUILD_EXISTS::no"; fi
run: if [ -f packages/next-swc/native/next-swc.freebsd-x64.node ]; then echo "BUILD_EXISTS=yes" >> $GITHUB_OUTPUT; else echo "BUILD_EXISTS=no" >> $GITHUB_OUTPUT; fi
id: build-exists

- run: echo ${{steps.build-exists.outputs.BUILD_EXISTS}}
Expand Down Expand Up @@ -1482,7 +1482,7 @@ jobs:
env:
TRACE_API_KEY: ${{ secrets.DATA_DOG_API_KEY }}
if: "${{ env.TRACE_API_KEY != '' }}"
run: echo "::set-output name=defined::true"
run: echo "defined=true" >> $GITHUB_OUTPUT

build-performance-metrics:
name: Performance Metrics for Release Build
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pull_request_stats.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fetch-depth: 25

- name: Check non-docs only change
run: echo "::set-output name=DOCS_CHANGE::$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')"
run: echo "DOCS_CHANGE=$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT
id: docs-change

- name: Cache cargo registry
Expand All @@ -43,7 +43,7 @@ jobs:

# We use week in the turbo cache key to keep the cache from infinitely growing
- id: get-week
run: echo ::set-output name=WEEK::$(date +%U)
run: echo "WEEK=$(date +%U)" >> $GITHUB_OUTPUT

- name: Turbo Cache
id: turbo-cache
Expand Down Expand Up @@ -106,7 +106,7 @@ jobs:
fetch-depth: 25

- name: Check non-docs only change
run: echo "::set-output name=DOCS_CHANGE::$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')"
run: echo "DOCS_CHANGE=$(node scripts/run-for-change.js --not --type docs --exec echo 'nope')" >> $GITHUB_OUTPUT
id: docs-change

- uses: actions/download-artifact@v3
Expand Down
2 changes: 1 addition & 1 deletion test/integration/create-next-app/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const run = (args: string[], options: execa.Options) =>
execa('node', [cli].concat(args), options)

describe('create next app', () => {
if (!process.env.NEXT_TEST_CNA && process.env.NEXT_TEST_JOB) {
if (!process.env.NEXT_TEST_CNA) {
it('should skip when env is not set', () => {})
return
}
Expand Down
4 changes: 2 additions & 2 deletions test/integration/create-next-app/templates.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ import {
import { useTempDir } from '../../../test/lib/use-temp-dir'

describe('create-next-app templates', () => {
if (!process.env.NEXT_TEST_CNA && process.env.NEXT_TEST_JOB) {
if (!process.env.NEXT_TEST_CNA) {
it('should skip when env is not set', () => {})
return
}
Expand Down Expand Up @@ -168,7 +168,7 @@ describe('create-next-app templates', () => {
})

describe('create-next-app --experimental-app-dir', () => {
if (!process.env.NEXT_TEST_CNA && process.env.NEXT_TEST_JOB) {
if (!process.env.NEXT_TEST_CNA) {
it('should skip when env is not set', () => {})
return
}
Expand Down