Skip to content

Commit

Permalink
fix: to get invalid latest local tag from github api
Browse files Browse the repository at this point in the history
  • Loading branch information
seia-soto committed Jul 31, 2023
1 parent f2287d5 commit 14667ee
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down

0 comments on commit 14667ee

Please sign in to comment.