Skip to content

Commit caf3228

Browse files
authored
Upgrade CI (#16)
1 parent 272d90d commit caf3228

File tree

2 files changed

+16
-23
lines changed

2 files changed

+16
-23
lines changed

.github/workflows/build.yml

+15-22
Original file line numberDiff line numberDiff line change
@@ -17,21 +17,14 @@ env:
1717
jobs:
1818
test-and-build:
1919
runs-on: ubuntu-latest
20-
container:
21-
image: node:22
20+
2221
steps:
23-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2423
- run: corepack enable
25-
- name: Get pnpm cache directory path
26-
id: pnpm-cache-dir-path
27-
run: echo "::set-output name=dir::$(pnpm store path)"
28-
- uses: actions/cache@v3
29-
id: pnpm-cache
24+
- uses: actions/setup-node@v4
3025
with:
31-
path: ${{ steps.pnpm-cache-dir-path.outputs.dir }}
32-
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }}
33-
restore-keys: |
34-
${{ runner.os }}-pnpm-
26+
node-version: 22
27+
cache: pnpm
3528
- name: Install packages
3629
run: pnpm install --frozen-lockfile
3730
- name: Test
@@ -40,13 +33,13 @@ jobs:
4033
run: pnpm lint
4134
- name: Build dist
4235
run: pnpm build
43-
- uses: actions/upload-artifact@v3
36+
- uses: actions/upload-artifact@v4
4437
with:
4538
name: dist
4639
path: dist/
4740
- name: Build docs
4841
run: pnpm run docs
49-
- uses: actions/upload-artifact@v3
42+
- uses: actions/upload-artifact@v4
5043
with:
5144
name: docs
5245
path: docs/
@@ -59,32 +52,32 @@ jobs:
5952
needs: test-and-build
6053
steps:
6154
- name: Checkout
62-
uses: actions/checkout@v2
63-
- uses: actions/download-artifact@v3
55+
uses: actions/checkout@v4
56+
- uses: actions/download-artifact@v4
6457
with:
6558
name: dist
6659
path: dist/
67-
- uses: actions/download-artifact@v3
60+
- uses: actions/download-artifact@v4
6861
with:
6962
name: docs
7063
path: docs/
7164
- name: Set up QEMU
72-
uses: docker/setup-qemu-action@v1
65+
uses: docker/setup-qemu-action@v3
7366
- name: Set up Docker Buildx
74-
uses: docker/setup-buildx-action@v1
67+
uses: docker/setup-buildx-action@v3
7568
- name: Log in to the Container registry
76-
uses: docker/login-action@v1
69+
uses: docker/login-action@v3
7770
with:
7871
registry: ${{ env.REGISTRY }}
7972
username: ${{ github.actor }}
8073
password: ${{ secrets.GITHUB_TOKEN }}
8174
- name: Extract metadata (tags, labels) for Docker
8275
id: meta
83-
uses: docker/metadata-action@v3
76+
uses: docker/metadata-action@v5
8477
with:
8578
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
8679
- name: Build and push
87-
uses: docker/build-push-action@v2
80+
uses: docker/build-push-action@v6
8881
with:
8982
context: .
9083
push: ${{ github.event_name != 'pull_request' }}

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ EXPOSE 8080
1515

1616
# RUN apt-get install -y git-core
1717

18-
CMD node ./index.js
18+
CMD ["node", "./index.js"]

0 commit comments

Comments
 (0)