Skip to content

Commit fb5616a

Browse files
committed
Update GitHub Actions
1 parent e411f1d commit fb5616a

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

.github/workflows/watch.yml

+9-7
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
check:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
outputs:
1212
version: ${{ steps.latest.outputs.ver }}
1313
need_build: ${{ steps.check.outputs.exists == 'false' }}
@@ -17,19 +17,21 @@ jobs:
1717
run: |
1818
VERSION=$(
1919
curl -sL 'https://api.github.com/repos/gwsw/less/git/refs/tags' |
20-
jq -r '.[-1].ref' | sed 's|^refs/tags/v||' | grep -Eo '^[0-9]+$'
20+
jq -r '.[-1].ref' |
21+
sed 's|^refs/tags/v||' |
22+
grep -Eo '^[0-9]+$'
2123
)
22-
echo "::set-output name=ver::${VERSION}"
24+
echo "ver=${VERSION}" >> "$GITHUB_OUTPUT"
2325
- name: Check if the tag already exists
24-
uses: mukunku/tag-exists-action@v1.0.0
26+
uses: mukunku/tag-exists-action@v1.5.0
2527
id: check
2628
with:
2729
tag: v${{ steps.latest.outputs.ver }}
2830
env:
2931
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3032

3133
prepare:
32-
runs-on: ubuntu-20.04
34+
runs-on: ubuntu-latest
3335
needs: [check]
3436
if: needs.check.outputs.need_build == 'true'
3537
outputs:
@@ -53,12 +55,12 @@ jobs:
5355
prerelease: false
5456

5557
build:
56-
runs-on: ubuntu-20.04
58+
runs-on: ubuntu-22.04
5759
needs: [prepare]
5860
steps:
5961
- run: |
6062
sudo apt-get install -y musl-tools make autoconf libncurses-dev
61-
wget 'https://github.com/gwsw/less/archive/v${{ needs.prepare.outputs.version }}.tar.gz' -O - | tar --strip-components=1 -zx
63+
curl -L 'https://github.com/gwsw/less/archive/v${{ needs.prepare.outputs.version }}.tar.gz' | tar --strip-components=1 -zx
6264
make -f Makefile.aut
6365
CFLAGS=-Os LDFLAGS=-static ./configure
6466
CC=musl-gcc make -j

0 commit comments

Comments
 (0)