Skip to content

Commit 828e363

Browse files
authored
ci: migrate deprecated set-output commands (#4351)
1 parent ffd45c5 commit 828e363

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

.github/workflows/chart.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@ jobs:
3434
id: new-version
3535
run: |
3636
NEW_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
37-
echo "::set-output name=version::$NEW_VERSION"
37+
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
3838
- name: Find old version
3939
id: old-version
4040
run: |
4141
git checkout ${{ github.event.pull_request.base.sha || github.event.before }}
4242
OLD_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
43-
echo "::set-output name=version::$OLD_VERSION"
43+
echo "version=$OLD_VERSION" >> $GITHUB_OUTPUT
4444
4545
helm-will-release:
4646
runs-on: ubuntu-latest
@@ -59,7 +59,7 @@ jobs:
5959
git log --exit-code $last_revision...${{ github.event.pull_request.base.sha }} charts/gitops-server
6060
unreleased_commits=$?
6161
if [[ $unreleased_commits == 1 ]]; then
62-
echo "::set-output name=unreleased-commits::The last chart was last released in $last_revision and there have been other changes in the chart since"
62+
echo "unreleased-commits=The last chart was last released in $last_revision and there have been other changes in the chart since" >> $GITHUB_OUTPUT
6363
fi
6464
- name: Let user know merging will cause a release
6565
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
@@ -86,7 +86,7 @@ jobs:
8686
id: new_version
8787
run: |
8888
NEW_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
89-
echo "::set-output name=version::$NEW_VERSION"
89+
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
9090
- name: Generate new chart
9191
run: |
9292
URL=https://helm.gitops.weave.works

.github/workflows/pr.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ jobs:
8080
tag: ${{ steps.generate-tag.outputs.tag }}
8181
steps:
8282
- id: generate-tag
83-
run: echo "::set-output name=tag::$(date -u +%s)-${{ github.sha }}"
83+
run: echo "tag=$(date -u +%s)-${{ github.sha }}" >> $GITHUB_OUTPUT
8484

8585
ci-build-gitops-image:
8686
name: CI Build Gitops Docker Image
@@ -171,7 +171,7 @@ jobs:
171171
- id: gitsha
172172
run: |
173173
gitsha=$(git rev-parse --short ${{ github.sha }})
174-
echo "::set-output name=sha::$gitsha"
174+
echo "sha=$gitsha" >> $GITHUB_OUTPUT
175175
- name: build
176176
run: |
177177
make gitops
@@ -216,7 +216,7 @@ jobs:
216216
id: package-version
217217
run: |
218218
GITOPS_VERSION=$(git describe)
219-
echo "::set-output name=js-version::$GITOPS_VERSION"
219+
echo "js-version=$GITOPS_VERSION" >> $GITHUB_OUTPUT
220220
jq '.version = "'$GITOPS_VERSION'" | .name = "@weaveworks/weave-gitops-main"' < dist/package.json > dist/package-new.json
221221
mv dist/package-new.json dist/package.json
222222
cp .npmrc dist

.github/workflows/release.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
GITHUB_EVENT_PULL_REQUEST_HEAD_REF: ${{ github.event.pull_request.head.ref }}
3232
run: |
3333
version=$(echo $GITHUB_EVENT_PULL_REQUEST_HEAD_REF | cut -d'/' -f2)
34-
echo "::set-output name=version::$version"
34+
echo "version=$version" >> $GITHUB_OUTPUT
3535
- name: Set tag
3636
run: |
3737
git config user.name weave-gitops-bot

.github/workflows/upgrade-flux.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
new_version="$(curl -s --request GET --url "https://api.github.com/repos/fluxcd/flux2/releases?per_page=1" | jq . | jq '.[0] | .tag_name' | jq -r | sed -e 's/v//')"
2424
2525
if [[ "$old_version" != "$new_version" ]]; then
26-
echo "::set-output name=version::$new_version"
26+
echo "version=$new_version" >> $GITHUB_OUTPUT
2727
fi
2828
upgrade-flux:
2929
needs:

0 commit comments

Comments
 (0)