diff --git a/.github/workflows/updateversion.yml b/.github/workflows/updateversion.yml index 01e59c5..768bacf 100644 --- a/.github/workflows/updateversion.yml +++ b/.github/workflows/updateversion.yml @@ -51,11 +51,11 @@ jobs: UPSTREAM="$(jq -r ".base.repo.clone_url" "$tmp")" LINK="${{github.event.issue.html_url}}" fi - echo "::set-output name=link::$LINK" - echo "::set-output name=ref::$REF" - echo "::set-output name=page::$REPO_PAGE" - echo "::set-output name=name::$REPO_NAME" - echo "::set-output name=upstream::$UPSTREAM" + echo "link=$LINK" >> $GITHUB_OUTPUT + echo "ref=$REF" >> $GITHUB_OUTPUT + echo "page=$REPO_PAGE" >> $GITHUB_OUTPUT + echo "name=$REPO_NAME" >> $GITHUB_OUTPUT + echo "upstream=$UPSTREAM" >> $GITHUB_OUTPUT - name: Checkout pull request uses: actions/checkout@v4 @@ -79,9 +79,9 @@ jobs: echo "::notice::you can resolve merge conflicts at $LINK/conflicts" exit 2 elif git diff --quiet FETCH_HEAD tokens.xml; then - echo "::set-output name=update::false" + echo "update=false" >> $GITHUB_OUTPUT else - echo "::set-output name=update::true" + echo "update=true" >> $GITHUB_OUTPUT fi - name: Get date @@ -93,14 +93,15 @@ jobs: previous="$(> $GITHUB_OUTPUT + echo "previous=$previous" >> $GITHUB_OUTPUT - name: Check for suffix used when multiple changes happen in a day if: steps.check.outputs.update == 'true' id: version shell: python run: | + import os import re previous = "${{steps.date.outputs.previous}}" date = "${{steps.date.outputs.date}}" @@ -124,7 +125,8 @@ jobs: else: charlist.append("a") version += "".join(reversed(charlist)) - print(f"::set-output name=version::{version}") + with open(os.environ["GITHUB_OUTPUT"], "a") as envFile: + print(f"version={version}", file=envFile) - name: Update date in files if: steps.check.outputs.update == 'true'