From 2f862a552a698f2c12d18e964371624b8cdae619 Mon Sep 17 00:00:00 2001 From: "Dylan K. Taylor" Date: Tue, 14 Mar 2023 18:31:25 +0000 Subject: [PATCH] actions: Replace deprecated ::set-output commands --- .github/workflows/build-docker-image.yml | 10 +++++----- .github/workflows/discord-release-notify.yml | 2 +- .github/workflows/draft-release.yml | 14 +++++++------- .github/workflows/update-updater-api.yml | 4 ++-- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build-docker-image.yml b/.github/workflows/build-docker-image.yml index a209fd688..7ff0925df 100644 --- a/.github/workflows/build-docker-image.yml +++ b/.github/workflows/build-docker-image.yml @@ -30,20 +30,20 @@ jobs: id: tag-name run: | VERSION=$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{') - echo ::set-output name=TAG_NAME::$VERSION - echo ::set-output name=MAJOR::$(echo $VERSION | cut -d. -f1) - echo ::set-output name=MINOR::$(echo $VERSION | cut -d. -f1-2) + echo TAG_NAME=$VERSION >> $GITHUB_OUTPUT + echo MAJOR=$(echo $VERSION | cut -d. -f1) >> $GITHUB_OUTPUT + echo MINOR=$(echo $VERSION | cut -d. -f1-2) >> $GITHUB_OUTPUT - name: Download new release information run: curl -f -L ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ steps.tag-name.outputs.TAG_NAME }}/build_info.json -o new_build_info.json - name: Detect channel id: channel - run: echo ::set-output name=CHANNEL::$(jq -r '.channel' new_build_info.json) + run: echo CHANNEL=$(jq -r '.channel' new_build_info.json) >> $GITHUB_OUTPUT - name: Get name of Docker repository name id: docker-repo-name - run: echo ::set-output name=NAME::$(echo "${GITHUB_REPOSITORY,,}") + run: echo NAME=$(echo "${GITHUB_REPOSITORY,,}") >> $GITHUB_OUTPUT - name: Build image for tag uses: docker/build-push-action@v4.0.0 diff --git a/.github/workflows/discord-release-notify.yml b/.github/workflows/discord-release-notify.yml index 2a5cadf2d..deb8e9ff0 100644 --- a/.github/workflows/discord-release-notify.yml +++ b/.github/workflows/discord-release-notify.yml @@ -32,7 +32,7 @@ jobs: - name: Get actual tag name id: tag-name - run: echo ::set-output name=TAG_NAME::$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{') + run: echo TAG_NAME=$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{') >> $GITHUB_OUTPUT - name: Run webhook post script run: php .github/workflows/discord-release-embed.php ${{ github.repository }} ${{ steps.tag-name.outputs.TAG_NAME }} ${{ github.token }} ${{ secrets.DISCORD_RELEASE_WEBHOOK }} ${{ secrets.DISCORD_NEWS_PING_ROLE_ID }} diff --git a/.github/workflows/draft-release.yml b/.github/workflows/draft-release.yml index 112155ba4..cce750118 100644 --- a/.github/workflows/draft-release.yml +++ b/.github/workflows/draft-release.yml @@ -40,7 +40,7 @@ jobs: run: | BUILD_NUMBER=$((2000+$GITHUB_RUN_NUMBER)) #to stay above jenkins echo "Build number: $BUILD_NUMBER" - echo ::set-output name=BUILD_NUMBER::$BUILD_NUMBER + echo BUILD_NUMBER=$BUILD_NUMBER >> $GITHUB_OUTPUT - name: Minify BedrockData JSON files run: php vendor/pocketmine/bedrock-data/.minify_json.php @@ -51,12 +51,12 @@ jobs: - name: Get PocketMine-MP release version id: get-pm-version run: | - echo ::set-output name=PM_VERSION::$(php -r 'require "vendor/autoload.php"; echo \pocketmine\VersionInfo::BASE_VERSION;') - echo ::set-output name=MCPE_VERSION::$(php -r 'require "vendor/autoload.php"; echo \pocketmine\network\mcpe\protocol\ProtocolInfo::MINECRAFT_VERSION_NETWORK;') - echo ::set-output name=PM_VERSION_SHORT::$(php -r 'require "vendor/autoload.php"; $v = explode(".", \pocketmine\VersionInfo::BASE_VERSION); array_pop($v); echo implode(".", $v);') - echo ::set-output name=PM_VERSION_MD::$(php -r 'require "vendor/autoload.php"; echo str_replace(".", "", \pocketmine\VersionInfo::BASE_VERSION);') - echo ::set-output name=CHANGELOG_SUFFIX::$(php -r 'require "vendor/autoload.php"; echo \pocketmine\VersionInfo::BUILD_CHANNEL === "stable" ? "" : "-" . \pocketmine\VersionInfo::BUILD_CHANNEL;') - echo ::set-output name=PRERELEASE::$(php -r 'require "vendor/autoload.php"; echo \pocketmine\VersionInfo::BUILD_CHANNEL === "stable" ? "false" : "true";') + echo PM_VERSION=$(php -r 'require "vendor/autoload.php"; echo \pocketmine\VersionInfo::BASE_VERSION;') >> $GITHUB_OUTPUT + echo MCPE_VERSION=$(php -r 'require "vendor/autoload.php"; echo \pocketmine\network\mcpe\protocol\ProtocolInfo::MINECRAFT_VERSION_NETWORK;') >> $GITHUB_OUTPUT + echo PM_VERSION_SHORT=$(php -r 'require "vendor/autoload.php"; $v = explode(".", \pocketmine\VersionInfo::BASE_VERSION); array_pop($v); echo implode(".", $v);') >> $GITHUB_OUTPUT + echo PM_VERSION_MD=$(php -r 'require "vendor/autoload.php"; echo str_replace(".", "", \pocketmine\VersionInfo::BASE_VERSION);') >> $GITHUB_OUTPUT + echo CHANGELOG_SUFFIX=$(php -r 'require "vendor/autoload.php"; echo \pocketmine\VersionInfo::BUILD_CHANNEL === "stable" ? "" : "-" . \pocketmine\VersionInfo::BUILD_CHANNEL;') >> $GITHUB_OUTPUT + echo PRERELEASE=$(php -r 'require "vendor/autoload.php"; echo \pocketmine\VersionInfo::BUILD_CHANNEL === "stable" ? "false" : "true";') >> $GITHUB_OUTPUT - name: Generate build info run: php build/generate-build-info-json.php ${{ github.sha }} ${{ steps.get-pm-version.outputs.PM_VERSION }} ${{ github.repository }} ${{ steps.build-number.outputs.BUILD_NUMBER }} ${{ github.run_id }} > build_info.json diff --git a/.github/workflows/update-updater-api.yml b/.github/workflows/update-updater-api.yml index aaac9b4d2..dc40d17e9 100644 --- a/.github/workflows/update-updater-api.yml +++ b/.github/workflows/update-updater-api.yml @@ -20,14 +20,14 @@ jobs: - name: Get actual tag name id: tag-name - run: echo ::set-output name=TAG_NAME::$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{') + run: echo TAG_NAME=$(echo "${{ github.ref }}" | sed 's{^refs/tags/{{') >> $GITHUB_OUTPUT - name: Download new release information run: curl -f -L ${{ github.server_url }}/${{ github.repository }}/releases/download/${{ steps.tag-name.outputs.TAG_NAME }}/build_info.json -o new_build_info.json - name: Detect channel id: channel - run: echo ::set-output name=CHANNEL::$(jq -r '.channel' new_build_info.json) + run: echo CHANNEL=$(jq -r '.channel' new_build_info.json) >> $GITHUB_OUTPUT - name: Copy release information run: |