Skip to content

Commit c0e9bee

Browse files
chore: update dependencies, improve ci security
Signed-off-by: Henry Gressmann <[email protected]>
1 parent b1dd41b commit c0e9bee

File tree

7 files changed

+80
-69
lines changed

7 files changed

+80
-69
lines changed

.github/workflows/container.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: "Build & Publish Container Image"
22

3-
permissions:
4-
contents: read
5-
packages: write
6-
73
on:
84
workflow_call:
95
inputs:
@@ -19,17 +15,24 @@ on:
1915

2016
jobs:
2117
docker-build:
18+
permissions:
19+
contents: read
20+
packages: write
21+
2222
runs-on: ubuntu-latest
2323
steps:
2424
- uses: actions/checkout@v4
2525
with:
2626
ref: ${{ inputs.tag }}
27+
persist-credentials: false
2728
- name: Setup Docker Buildx
2829
uses: docker/setup-buildx-action@v3
2930
- name: Extract Semver
3031
id: semver
32+
env:
33+
INPUT_TAG: "${{ inputs.tag }}"
3134
run: |
32-
SEMVER_VERSION=$(echo "${{ inputs.tag }}" | sed -E 's/liwan-v//')
35+
SEMVER_VERSION=$(echo "$INPUT_TAG" | sed -E 's/liwan-v//')
3336
echo "SEMVER_VERSION=${SEMVER_VERSION}" >> "$GITHUB_OUTPUT"
3437
- name: Setup Docker Metadata
3538
uses: docker/metadata-action@v5

.github/workflows/release.yaml

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
name: Release
22

3-
permissions:
4-
contents: write
5-
packages: write
6-
73
on:
84
push:
95
tags:
@@ -14,7 +10,9 @@ jobs:
1410
runs-on: ubuntu-latest
1511
steps:
1612
- uses: actions/checkout@v4
17-
- uses: taiki-e/create-gh-release-action@v1
13+
with:
14+
persist-credentials: false
15+
- uses: taiki-e/[email protected]
1816
with:
1917
changelog: CHANGELOG.md
2018
allow-missing-changelog: true
@@ -26,6 +24,8 @@ jobs:
2624
runs-on: ubuntu-latest
2725
steps:
2826
- uses: actions/checkout@v4
27+
with:
28+
persist-credentials: false
2929
- uses: oven-sh/setup-bun@v2
3030
with:
3131
bun-version: latest
@@ -41,6 +41,8 @@ jobs:
4141
path: ./web/dist
4242

4343
upload-assets:
44+
permissions:
45+
contents: write
4446
needs: [create-release, build-web]
4547
strategy:
4648
matrix:
@@ -58,18 +60,22 @@ jobs:
5860
runs-on: ${{ matrix.os }}
5961
steps:
6062
- uses: actions/checkout@v4
63+
with:
64+
persist-credentials: false
6165
- uses: actions/download-artifact@v4
6266
with:
6367
name: web-dist
6468
path: ./web/dist
65-
- uses: taiki-e/upload-rust-binary-action@v1
69+
- uses: taiki-e/upload-rust-binary-action@v1.23.0
6670
with:
6771
bin: liwan
6872
target: ${{ matrix.target }}
6973
build-tool: ${{ matrix.build-tool }}
7074
token: ${{ secrets.GITHUB_TOKEN }}
7175

7276
publish-container:
77+
permissions:
78+
packages: write
7379
needs: [create-release, upload-assets]
7480
uses: explodingcamera/liwan/.github/workflows/container.yaml@main
7581
with:

.github/workflows/test-web.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ jobs:
1818
runs-on: ubuntu-latest
1919
steps:
2020
- uses: actions/checkout@v4
21+
with:
22+
persist-credentials: false
2123
- uses: oven-sh/setup-bun@v2
2224
with:
2325
bun-version: latest

.github/workflows/test.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
runs-on: ${{ matrix.os }}
2323
steps:
2424
- uses: actions/checkout@v4
25+
with:
26+
persist-credentials: false
2527
- uses: actions-rust-lang/setup-rust-toolchain@v1
2628
- uses: Swatinem/rust-cache@v2
2729
- run: mkdir ./web/dist

0 commit comments

Comments
 (0)