Skip to content

Commit ebef7fb

Browse files
ci: update actions
Signed-off-by: Henry <mail@henrygressmann.de>
1 parent d55149d commit ebef7fb

File tree

5 files changed

+27
-22
lines changed

5 files changed

+27
-22
lines changed

.github/workflows/container.yaml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ jobs:
2121

2222
runs-on: ubuntu-24.04
2323
steps:
24-
- uses: actions/checkout@v6
24+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2525
with:
2626
persist-credentials: false
2727
- name: Setup Docker Buildx
28-
uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # @v3
28+
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
2929
- name: Extract Semver
3030
id: semver
3131
env:
@@ -34,7 +34,7 @@ jobs:
3434
SEMVER_VERSION=$(echo "$INPUT_TAG" | sed -E 's/liwan-v//')
3535
echo "SEMVER_VERSION=${SEMVER_VERSION}" >> "$GITHUB_OUTPUT"
3636
- name: Setup Docker Metadata
37-
uses: docker/metadata-action@318604b99e75e41977312d83839a89be02ca4893 # @v5
37+
uses: docker/metadata-action@030e881283bb7a6894de51c315a6bfe6a94e05cf # v6.0.0
3838
id: meta
3939
with:
4040
images: ghcr.io/${{ github.actor }}/liwan
@@ -44,27 +44,32 @@ jobs:
4444
type=semver,pattern={{major}},value=${{ steps.semver.outputs.SEMVER_VERSION }}
4545
type=raw,edge
4646
- name: Login to GitHub Container Registry
47-
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # @v3
47+
uses: docker/login-action@b45d80f862d83dbcd57f89517bcf500b2ab88fb2 # v4.0.0
4848
with:
4949
registry: ghcr.io
5050
username: ${{ github.actor }}
5151
password: ${{ secrets.GITHUB_TOKEN }}
5252
- name: Download liwan binaries
53+
env:
54+
INPUT_TAG: "${{ inputs.tag }}"
5355
run: |
5456
mkdir -p dist/amd64 dist/arm64
5557
56-
curl -fsSL https://github.com/explodingcamera/liwan/releases/download/${{ inputs.tag }}/liwan-x86_64-unknown-linux-musl.tar.gz \
58+
# sanitize tag: only keep alphanum, dot, underscore, dash
59+
SAFE_TAG=$(echo "$INPUT_TAG" | sed 's/[^A-Za-z0-9._-]/_/g')
60+
61+
curl -fsSL https://github.com/explodingcamera/liwan/releases/download/$SAFE_TAG/liwan-x86_64-unknown-linux-musl.tar.gz \
5762
| tar -xz -C dist/amd64 &
5863
59-
curl -fsSL https://github.com/explodingcamera/liwan/releases/download/${{ inputs.tag }}/liwan-aarch64-unknown-linux-musl.tar.gz \
64+
curl -fsSL https://github.com/explodingcamera/liwan/releases/download/$SAFE_TAG/liwan-aarch64-unknown-linux-musl.tar.gz \
6065
| tar -xz -C dist/arm64 &
6166
6267
wait
6368
- name: Build and push Docker images
64-
uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6
69+
uses: docker/build-push-action@d08e5c354a6adb9ed34480a06d141179aa583294 # v7.0.0
6570
with:
6671
context: .
67-
file: ./scripts/Dockerfile
72+
file: ./scripts/Containerfile
6873
push: true
6974
platforms: linux/amd64,linux/arm64
7075
tags: ${{ steps.meta.outputs.tags }}

.github/workflows/release.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ jobs:
1111
contents: write
1212
runs-on: ubuntu-24.04
1313
steps:
14-
- uses: actions/checkout@v6
14+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
1515
with:
1616
persist-credentials: false
17-
- uses: taiki-e/create-gh-release-action@26b80501670402f1999aff4b934e1574ef2d3705 # @v1.9.1
17+
- uses: taiki-e/create-gh-release-action@c5baa0b5dc700cf06439d87935e130220a6882d9 # v1.9.3
1818
with:
1919
changelog: CHANGELOG.md
2020
allow-missing-changelog: true
@@ -27,10 +27,10 @@ jobs:
2727
permissions:
2828
contents: write
2929
steps:
30-
- uses: actions/checkout@v6
30+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
3131
with:
3232
persist-credentials: false
33-
- uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # @v2
33+
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2.1.3
3434
with:
3535
bun-version: latest
3636
no-cache: true
@@ -40,7 +40,7 @@ jobs:
4040
bun run build
4141
working-directory: ./web
4242
- name: Upload web assets
43-
uses: actions/upload-artifact@v5
43+
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
4444
with:
4545
name: web-dist
4646
path: ./web/dist
@@ -64,17 +64,17 @@ jobs:
6464

6565
runs-on: ${{ matrix.os }}
6666
steps:
67-
- uses: actions/checkout@v6
67+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
6868
with:
6969
persist-credentials: false
70-
- uses: actions/download-artifact@v6
70+
- uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
7171
with:
7272
name: web-dist
7373
path: ./web/dist
74-
- uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # @v1.15.2
74+
- uses: actions-rust-lang/setup-rust-toolchain@a0b538fa0b742a6aa35d6e2c169b4bd06d225a98 # v1.15.3
7575
with:
7676
cache: false
77-
- uses: taiki-e/upload-rust-binary-action@3962470d6e7f1993108411bc3f75a135ec67fc8c # @v1.27.0
77+
- uses: taiki-e/upload-rust-binary-action@381995c84a8e242b8736ec80211c563d7bd07ce7 # v1.28.1
7878
with:
7979
bin: liwan
8080
target: ${{ matrix.target }}

.github/workflows/test-web.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ jobs:
1919
permissions:
2020
contents: read
2121
steps:
22-
- uses: actions/checkout@v6
22+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2323
with:
2424
persist-credentials: false
25-
- uses: oven-sh/setup-bun@735343b667d3e6f658f44d0eca948eb6282f2b76 # @v2
25+
- uses: oven-sh/setup-bun@ecf28ddc73e819eb6fa29df6b34ef8921c743461 # v2.1.3
2626
with:
2727
bun-version: latest
2828
- name: Build web project

.github/workflows/test.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ jobs:
2323
name: Run tests on ${{ matrix.os }}
2424
runs-on: ${{ matrix.os }}
2525
steps:
26-
- uses: actions/checkout@v6
26+
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
2727
with:
2828
persist-credentials: false
29-
- uses: actions-rust-lang/setup-rust-toolchain@1780873c7b576612439a134613cc4cc74ce5538c # @v1.15.2
29+
- uses: actions-rust-lang/setup-rust-toolchain@a0b538fa0b742a6aa35d6e2c169b4bd06d225a98 # v1.15.3
3030
with:
3131
components: clippy, rustfmt
32-
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # @v2.8.2
32+
- uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
3333
- run: mkdir ./web/dist
3434
- name: Run tests
3535
run: cargo test --all --all-features

0 commit comments

Comments
 (0)