Update version grabber

This commit is contained in:
Vadim Vetrov 2024-08-29 18:13:51 +03:00
parent cad262f201
commit 0a679ea41c
No known key found for this signature in database
GPG Key ID: E8A308689D7A73A5

View File

@ -18,6 +18,11 @@ jobs:
version: ${{ steps.gh.outputs.version }} version: ${{ steps.gh.outputs.version }}
sha: ${{ steps.gh.outputs.sha }} sha: ${{ steps.gh.outputs.sha }}
steps: steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: 'openwrt'
- name: GH - name: GH
id: gh id: gh
env: env:
@ -25,7 +30,7 @@ jobs:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash shell: bash
run: | run: |
echo "version=$(gh api repos/$REPO/releases/latest --jq '.tag_name' | sed 's/v//')" >> $GITHUB_OUTPUT echo "version=$(cat youtubeUnblock/Makefile | grep PKG_VERSION | sed 's/PKG_VERSION:=//')" >> $GITHUB_OUTPUT
if [[ "${{ github.event_name }}" != "pull_request" ]]; then if [[ "${{ github.event_name }}" != "pull_request" ]]; then
echo "sha=$(echo ${GITHUB_SHA::7})" >> $GITHUB_OUTPUT echo "sha=$(echo ${GITHUB_SHA::7})" >> $GITHUB_OUTPUT
else else