From 14667ee0ea69c58a4bb18903256627f3cc2c1954 Mon Sep 17 00:00:00 2001 From: HoJeong Go Date: Mon, 31 Jul 2023 11:07:38 +0900 Subject: [PATCH] fix: to get invalid latest local tag from github api --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f18c786..4765fa1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -19,17 +19,17 @@ jobs: run: | git clone https://github.com/Jigsaw-Code/outline-server.git outline-server cd outline-server - echo "::set-output name=tag::$(git describe --tags --abbrev=0)" + echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT - name: Get local release id: local run: | - echo ::set-output name=tag::"$(curl -sL "https://api.github.com/repos/${{github.repository}}/releases" | jq -r '[.[] | select(.name | startswith("latest-"))][0].name')" + echo "tag=$(curl -sL "https://api.github.com/repos/${{github.repository}}/releases" | jq -r '[.[] | select(.name | startswith("latest-"))] | sort_by(.published_at)[-1].name')" >> $GITHUB_OUTPUT - name: Test id: test run: | if [[ "latest-${{steps.remote.outputs.tag}}" != "${{steps.local.outputs.tag}}" ]]; then - echo "::set-output name=latest::true" + echo "latest=true" >> $GITHUB_OUTPUT fi build_master: needs: [version]