Skip to content

Commit

Permalink
Use new set-output format (#15082)
Browse files Browse the repository at this point in the history
Co-authored-by: Hu谩ng J霉nli脿ng <jlhwung@gmail.com>
  • Loading branch information
nicolo-ribaudo and JLHwung committed Oct 28, 2022
1 parent bea7a43 commit 4266187
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests-breaking-esm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:
steps:
- name: Get yarn1 cache directory path
id: yarn1-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
Expand All @@ -58,7 +58,7 @@ jobs:
node-version: "*"
- name: Get yarn3 cache directory path
id: yarn3-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Use yarn1 cache
uses: actions/cache@v3
id: yarn1-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests-breaking.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
steps:
- name: Get yarn1 cache directory path
id: yarn1-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
Expand All @@ -60,7 +60,7 @@ jobs:
node-version: "*"
- name: Get yarn3 cache directory path
id: yarn3-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Use yarn1 cache
uses: actions/cache@v3
id: yarn1-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests-esm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
steps:
- name: Get yarn1 cache directory path
id: yarn1-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
Expand All @@ -57,7 +57,7 @@ jobs:
node-version: "*"
- name: Get yarn3 cache directory path
id: yarn3-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Use yarn1 cache
uses: actions/cache@v3
id: yarn1-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
steps:
- name: Get yarn1 cache directory path
id: yarn1-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
- name: Checkout code
uses: actions/checkout@v3
- name: Use Node.js latest
Expand All @@ -59,7 +59,7 @@ jobs:
node-version: "*"
- name: Get yarn3 cache directory path
id: yarn3-cache-dir-path
run: echo "::set-output name=dir::$(yarn config get cacheFolder)"
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: Use yarn1 cache
uses: actions/cache@v3
id: yarn1-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
git-version:
permissions:
contents: write # for Git to git push
contents: write # for Git to git push
name: Create git tag and commit
runs-on: ubuntu-latest
needs: log-updates
Expand All @@ -63,7 +63,7 @@ jobs:
run: |
branch="release/temp/$(git describe --abbrev=0)"
echo $branch
echo "::set-output name=branch::$branch"
echo "branch=$branch" >> $GITHUB_OUTPUT
git push "https://babel-bot:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git" HEAD:"$branch" --follow-tags
Expand Down Expand Up @@ -141,7 +141,7 @@ jobs:

github-push:
permissions:
contents: write # for Git to git push
contents: write # for Git to git push
name: Push release commit to "main"
runs-on: ubuntu-latest
needs: [npm-release, github-release, git-version]
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/update-compat-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,14 @@ jobs:
node-version: "*"
- name: Get latest kangax/compat-table commit
id: lastCommit
run: echo "::set-output name=sha1::$(./scripts/update-compat-table/get-last-commit.sh)"
run: echo "sha1=$(./scripts/update-compat-table/get-last-commit.sh)" >> $GITHUB_OUTPUT
- name: Update compat-table commit
run: echo ${{ steps.lastCommit.outputs.sha1 }} | ./scripts/update-compat-table/bump-compat-table-commit.sh
- name: Check if it has been updated
run: |
[[ -z $(git status -s) ]] &&
echo "::set-output name=updated::false" ||
echo "::set-output name=updated::true"
echo "updated=false" >> $GITHUB_OUTPUT ||
echo "updated=true" >> $GITHUB_OUTPUT
id: updated
- name: Bootstrap
if: steps.updated.outputs.updated == 'true'
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-parser-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
cache: "yarn"
- name: Get latest test262 version
id: test262
run: echo "::set-output name=sha1::$(sh ./scripts/parser-tests/get-test262-version.sh)"
run: echo "sha1=$(sh ./scripts/parser-tests/get-test262-version.sh)" >> $GITHUB_OUTPUT
- name: Update test262 commit
run: |
echo ${{ steps.test262.outputs.sha1 }} | ./scripts/parser-tests/bump-test262-version.sh
Expand Down
12 changes: 7 additions & 5 deletions .github/workflows/update-windows-fixtures.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@ jobs:
update-windows-fixtures:
permissions:
contents: read # to fetch code
pull-requests: read # to get PR metadata
pull-requests: read # to get PR metadata
runs-on: windows-latest
steps:
- name: Get Pull Request branch
uses: actions/github-script@v4
uses: actions/github-script@v6
id: pr-meta
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { data: pullRequest } = await github.pulls.get({
const { data: pullRequest } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: ${{ github.event.inputs.pull_request }},
Expand All @@ -34,8 +34,10 @@ jobs:
repo: { full_name: repository }
} = pullRequest.head;
console.log(`::set-output name=branch::${branch}`);
console.log(`::set-output name=repository::${repository}`);
const fs = require("fs");
const { GITHUB_OUTPUT } = process.env;
fs.appendFileSync(GITHUB_OUTPUT, `branch=${branch}\n`);
fs.appendFileSync(GITHUB_OUTPUT, `repository=${repository}\n`);
- name: Checkout code
uses: actions/checkout@v3
Expand Down

0 comments on commit 4266187

Please sign in to comment.