Skip to content

Commit 1d02d76

Browse files
committed
Update workflows from templates.
1 parent 0bab6e1 commit 1d02d76

File tree

5 files changed

+11
-17
lines changed

5 files changed

+11
-17
lines changed

.github/bump-version.bump.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ if [ -z "${RELEASEVERS}" ] ; then
6161
;;
6262
esac
6363
fi
64-
echo "::set-output name=release::${RELEASEVERS}"
64+
echo "release=${RELEASEVERS}" >> "$GITHUB_OUTPUT"
6565

6666
# Derive a new bumped version from the release version.
6767
# Increment the last number in the string.
@@ -72,4 +72,4 @@ VERSION="$(echo "${VERSION}" | sed -E 's/([-.])rc([-.]|$)/\1pre\2/')"
7272
if ! [[ ${VERSION} =~ [-.]pre([-.]|$) ]] ; then
7373
VERSION="${VERSION}-pre"
7474
fi
75-
echo "::set-output name=bumped::${VERSION}"
75+
echo "bumped=${VERSION}" >> "$GITHUB_OUTPUT"

.github/update-workflows.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/bin/bash
1+
#!/usr/bin/env bash
22

33
# This script is copied from the depot repo; edit it there, not in the destination repo.
44

.github/workflows/bump-version.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
commit-prefix: ${{ steps.echo.outputs.commit-prefix }}
2222
steps:
2323
- id: echo
24-
run: echo "::set-output name=commit-prefix::${{ env.COMMIT_PREFIX }}"
24+
run: echo "commit-prefix=${{ env.COMMIT_PREFIX }}" >> "$GITHUB_OUTPUT"
2525
bump:
2626
needs:
2727
- vars
@@ -40,7 +40,7 @@ jobs:
4040
'
4141
- name: Get version
4242
id: current
43-
run: echo "::set-output name=version::$(.github/bump-version.get.sh)"
43+
run: echo "version=$(.github/bump-version.get.sh)" >> "$GITHUB_OUTPUT"
4444
- name: Compute versions
4545
id: versions
4646
run: .github/bump-version.bump.sh "${{ env.MODE }}" "${{ steps.current.outputs.version
@@ -78,7 +78,7 @@ jobs:
7878
PR=$(jq -r \".[] | select(.merge_commit_sha == \\\"${COMMIT}\\\") | .number\"\
7979
\ /tmp/prs.json)\nif [ \"${PR}\" = \"null\" ] || [ -z \"${PR}\" ] ; then\n\
8080
\ exit 0\nfi\n# Build the string we'll use as the description of the release.\n\
81-
echo \"::set-output name=body::latest_pr:${PR}\"\n"
81+
echo \"body=latest_pr:${PR}\" >> \"$GITHUB_OUTPUT\"\n"
8282
- name: Create prerelease
8383
uses: ncipollo/release-action@v1
8484
with:

.github/workflows/rust-ci.yaml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ jobs:
1818
runs-on: ubuntu-22.04
1919
steps:
2020
- uses: actions/checkout@v3
21-
- uses: actions-rs/toolchain@v1
21+
- uses: IronCoreLabs/rust-toolchain@v1
2222
with:
23-
profile: minimal
24-
toolchain: stable
25-
override: true
2623
components: rustfmt
2724
- run: cargo fmt --all -- --check
2825
- name: Install cargo-sort
@@ -42,11 +39,8 @@ jobs:
4239
runs-on: ubuntu-22.04
4340
steps:
4441
- uses: actions/checkout@v3
45-
- uses: actions-rs/toolchain@v1
42+
- uses: IronCoreLabs/rust-toolchain@v1
4643
with:
47-
profile: minimal
48-
toolchain: stable
49-
override: true
5044
components: clippy
5145
- uses: actions-rs/cargo@v1
5246
if: env.clippy_args != ''

.github/workflows/update-workflows.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,10 @@ jobs:
8383
working-directory: thisrepo
8484
run: "set -x\nset -o pipefail\n\n# If it fails, we still want to create a PR;\
8585
\ it helps signal a human to come fix it.\nif ! bash -x .github/update-workflows.sh\
86-
\ ; then\n echo \"::set-output name=failed::true\"\nelse\n echo \"::set-output\
87-
\ name=failed::false\"\nfi\n\necho \"Git status:\"\ngit status\n\ngit add\
86+
\ ; then\n echo \"failed=true\" >> \"$GITHUB_OUTPUT\"\nelse\n echo \"failed=false\"\
87+
\ >> \"$GITHUB_OUTPUT\"\nfi\n\necho \"Git status:\"\ngit status\n\ngit add\
8888
\ -A\n\nif [ -z \"$(git status --porcelain)\" ] ; then\n echo \"No updated\
89-
\ workflows; done.\"\n echo \"::set-output name=skip::true\"\nfi\n"
89+
\ workflows; done.\"\n echo \"skip=true\" >> \"$GITHUB_OUTPUT\"\nfi\n"
9090
- name: Commit and push or PR
9191
working-directory: thisrepo
9292
if: steps.update.outputs.skip != 'true'

0 commit comments

Comments
 (0)