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

ci: Use GITHUB_OUTPUT envvar instead of set-output command #4190

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
8 changes: 4 additions & 4 deletions .github/workflows/chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ jobs:
id: new-version
run: |
NEW_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
echo "::set-output name=version::$NEW_VERSION"
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Find old version
id: old-version
run: |
git checkout ${{ github.event.pull_request.base.sha || github.event.before }}
OLD_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
echo "::set-output name=version::$OLD_VERSION"
echo "version=$OLD_VERSION" >> $GITHUB_OUTPUT

helm-will-release:
runs-on: ubuntu-latest
Expand All @@ -59,7 +59,7 @@ jobs:
git log --exit-code $last_revision...${{ github.event.pull_request.base.sha }} charts/gitops-server
unreleased_commits=$?
if [[ $unreleased_commits == 1 ]]; then
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"
echo "unreleased-commits=The last chart was last released in $last_revision and there have been other changes in the chart since" >> $GITHUB_OUTPUT
fi
- name: Let user know merging will cause a release
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6.4.1
Expand All @@ -86,7 +86,7 @@ jobs:
id: new_version
run: |
NEW_VERSION=$(yq e '.version' charts/gitops-server/Chart.yaml)
echo "::set-output name=version::$NEW_VERSION"
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
- name: Generate new chart
run: |
URL=https://helm.gitops.weave.works
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ jobs:
tag: ${{ steps.generate-tag.outputs.tag }}
steps:
- id: generate-tag
run: echo "::set-output name=tag::$(date -u +%s)-${{ github.sha }}"
run: echo "tag=$(date -u +%s)-${{ github.sha }}" >> $GITHUB_OUTPUT

ci-build-gitops-image:
name: CI Build Gitops Docker Image
Expand Down Expand Up @@ -195,7 +195,7 @@ jobs:
- id: gitsha
run: |
gitsha=$(git rev-parse --short ${{ github.sha }})
echo "::set-output name=sha::$gitsha"
echo "sha=$gitsha" >> $GITHUB_OUTPUT
- name: build
run: |
make gitops
Expand Down Expand Up @@ -239,7 +239,7 @@ jobs:
id: package-version
run: |
GITOPS_VERSION=$(git describe)
echo "::set-output name=js-version::$GITOPS_VERSION"
echo "js-version=$GITOPS_VERSION" >> $GITHUB_OUTPUT
jq '.version = "'$GITOPS_VERSION'" | .name = "@weaveworks/weave-gitops-main"' < dist/package.json > dist/package-new.json
mv dist/package-new.json dist/package.json
cp .npmrc dist
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
GITHUB_EVENT_PULL_REQUEST_HEAD_REF: ${{ github.event.pull_request.head.ref }}
run: |
version=$(echo $GITHUB_EVENT_PULL_REQUEST_HEAD_REF | cut -d'/' -f2)
echo "::set-output name=version::$version"
echo "version=$version" >> $GITHUB_OUTPUT
- name: Set tag
run: |
git config user.name weave-gitops-bot
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/upgrade-flux.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
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//')"

if [[ "$old_version" != "$new_version" ]]; then
echo "::set-output name=version::$new_version"
echo "version=$new_version" >> $GITHUB_OUTPUT
fi
upgrade-flux:
needs:
Expand Down
Loading