Skip to content

Commit 14667ee

Browse files
committed
fix: to get invalid latest local tag from github api
1 parent f2287d5 commit 14667ee

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

.github/workflows/build.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,17 @@ jobs:
1919
run: |
2020
git clone https://github.com/Jigsaw-Code/outline-server.git outline-server
2121
cd outline-server
22-
echo "::set-output name=tag::$(git describe --tags --abbrev=0)"
22+
echo "tag=$(git describe --tags --abbrev=0)" >> $GITHUB_OUTPUT
2323
- name: Get local release
2424
id: local
2525
run: |
26-
echo ::set-output name=tag::"$(curl -sL "https://api.github.com/repos/${{github.repository}}/releases" | jq -r '[.[] | select(.name | startswith("latest-"))][0].name')"
26+
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
2727
- name: Test
2828
id: test
2929
run: |
3030
if [[ "latest-${{steps.remote.outputs.tag}}" != "${{steps.local.outputs.tag}}" ]];
3131
then
32-
echo "::set-output name=latest::true"
32+
echo "latest=true" >> $GITHUB_OUTPUT
3333
fi
3434
build_master:
3535
needs: [version]

0 commit comments

Comments
 (0)