Skip to content

Commit e89175a

Browse files
committed
Use GITHUB_OUTPUT
1 parent 9c0ce65 commit e89175a

File tree

6 files changed

+11
-11
lines changed

6 files changed

+11
-11
lines changed

.github/workflows/commit/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@ runs:
2424
git add .
2525
git commit -m "Auto-update from GitHub Actions"$'\n'$'\n'"Run: ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}"
2626
git push -u origin HEAD
27-
echo ::set-output name=sha::$(git rev-parse HEAD)
27+
echo sha=$(git rev-parse HEAD) >> $GITHUB_OUTPUT
2828
fi
2929
shell: bash

.github/workflows/dep-matrix/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,5 +130,5 @@ runs:
130130
']}'
131131
)
132132
writeLines(json)
133-
writeLines(paste0("::set-output name=matrix::", json))
133+
writeLines(paste0("matrix=", json), Sys.getenv("GITHUB_OUTPUT"))
134134
shell: Rscript {0}

.github/workflows/get-extra/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,5 @@ runs:
1212
run: |
1313
set -x
1414
packages=$( ( grep Config/gha/extra-packages DESCRIPTION || true ) | cut -d " " -f 2)
15-
echo ::set-output name=packages::$packages
15+
echo packages=$packages >> $GITHUB_OUTPUT
1616
shell: bash

.github/workflows/revdep.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ jobs:
4444
']}'
4545
)
4646
writeLines(json)
47-
writeLines(paste0("::set-output name=matrix::", json))
47+
writeLines(paste0("matrix=", json), Sys.getenv("GITHUB_OUTPUT"))
4848
shell: Rscript {0}
4949

5050
check-matrix:

.github/workflows/style/action.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ runs:
1010
scope=$( ( grep Config/autostyle/scope DESCRIPTION || true ) | cut -d " " -f 2)
1111
strict=$( ( grep Config/autostyle/strict DESCRIPTION || true ) | cut -d " " -f 2)
1212
rmd=$( ( grep Config/autostyle/rmd DESCRIPTION || true ) | cut -d " " -f 2)
13-
echo ::set-output name=scope::$scope
14-
echo ::set-output name=strict::$strict
15-
echo ::set-output name=rmd::$rmd
13+
echo scope=$scope >> $GITHUB_OUTPUT
14+
echo strict=$strict >> $GITHUB_OUTPUT
15+
echo rmd=$rmd >> $GITHUB_OUTPUT
1616
shell: bash
1717

1818
- uses: actions/cache@v3

.github/workflows/update-snapshots/action.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ runs:
2626
print(failures[names(failures) != "result"])
2727
print(failures$result)
2828
testthat::snapshot_accept()
29-
writeLines("::set-output name=changed::true")
29+
writeLines("changed=true" >> $GITHUB_OUTPUT)
3030
} else {
3131
writeLines("Snapshot tests ran successfully.")
3232
}
@@ -50,16 +50,16 @@ runs:
5050
if: ${{ steps.run-tests.outputs.changed }}
5151
id: check-changed
5252
run: |
53-
echo "::set-output name=changed::$(git status --porcelain -- tests/testthat/_snaps)"
53+
echo "changed=$(git status --porcelain -- tests/testthat/_snaps)" >> $GITHUB_OUTPUT
5454
shell: bash
5555

5656
- name: Derive branch name
5757
if: ${{ steps.check-changed.outputs.changed }}
5858
id: matrix-desc
5959
run: |
6060
config=$(echo '${{ toJSON(matrix) }}' | jq -c .)
61-
echo "::set-output name=text::$(echo ${config})"
62-
echo "::set-output name=branch::$(echo ${config} | sed -r 's/[^0-9a-zA-Z]+/-/g;s/^-//;s/-$//')"
61+
echo "text=$(echo ${config})" >> $GITHUB_OUTPUT
62+
echo "branch=$(echo ${config} | sed -r 's/[^0-9a-zA-Z]+/-/g;s/^-//;s/-$//')" >> $GITHUB_OUTPUT
6363
shell: bash
6464

6565
- name: Create pull request

0 commit comments

Comments
 (0)