File tree Expand file tree Collapse file tree 4 files changed +12
-18
lines changed
Expand file tree Collapse file tree 4 files changed +12
-18
lines changed Original file line number Diff line number Diff line change 4040 id : latest-version
4141 working-directory : openfe_repo
4242 run : |
43- LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
44- # slice off the v, ie v0.7.2 -> 0.7.2
45- VERSION=${LATEST_TAG:1}
43+ REPO="${{ github.repository }}"
44+ VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
45+ "https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
4646 echo $VERSION
4747 echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
4848
Original file line number Diff line number Diff line change 7878 - name : Get Latest Version
7979 id : latest-version
8080 run : |
81- LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
82- echo $LATEST_TAG
83- echo "LATEST_TAG=$LATEST_TAG" >> $GITHUB_OUTPUT
84- # slice off the v, ie v0.7.2 -> 0.7.2
85- VERSION=${LATEST_TAG:1}
81+ REPO="${{ github.repository }}"
82+ VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
83+ "https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
8684 echo $VERSION
8785 echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
8886
Original file line number Diff line number Diff line change @@ -22,14 +22,10 @@ jobs:
2222 # This saves me some time since we only need the latest tag
2323 - name : Get latest tag
2424 id : latest-version
25- env :
26- GH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
27- REPO : ${{ github.repository }}
2825 run : |
29- LATEST_TAG=$(curl -s -H "Authorization: token $GH_TOKEN" \
30- https://api.github.com/repos/$REPO/tags \
31- | jq -r '.[0].name')
32- VERSION=${LATEST_TAG:1}
26+ REPO="${{ github.repository }}"
27+ VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
28+ "https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
3329 echo $VERSION
3430 echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
3531
Original file line number Diff line number Diff line change 2525 - name : Get Latest Version
2626 id : latest-version
2727 run : |
28- LATEST_TAG=$(git describe --tags $(git rev-list --tags --max-count=1))
29- # slice off the v, ie v0.7.2 -> 0.7.2
30- VERSION=${LATEST_TAG:1}
28+ REPO="${{ github.repository }}"
29+ VERSION=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
30+ "https://api.github.com/repos/$REPO/releases/latest" | jq -r '.tag_name | ltrimstr("v")')
3131 echo $VERSION
3232 echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
3333
You can’t perform that action at this time.
0 commit comments