@@ -3,46 +3,62 @@ name: CI
33on : [push, workflow_dispatch]
44
55env :
6- NODE_VERSION : 24
6+ NODE_VERSION : 26
77
88jobs :
9- linting :
10- name : Linting
9+ validate :
10+ name : Validate and build
1111 runs-on : ubuntu-latest
1212 steps :
13+ - name : Code Checkout
14+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
15+
16+ - name : Install Corepack # for pnpm
17+ run : |
18+ npm install -g corepack@0.34.7 --ignore-scripts
19+ corepack enable
20+ corepack install
21+
1322 - name : Install NodeJS
14- uses : actions/setup-node@v5
23+ uses : actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0
1524 with :
1625 node-version : ${{ env.NODE_VERSION }}
17-
18- - name : Code Checkout
19- uses : actions/checkout@v5
26+ cache : ' pnpm '
27+ cache-dependency-path : ' pnpm-lock.yaml '
28+ package-manager-cache : true
2029
2130 - name : Install Dependencies
22- run : npm install
31+ run : pnpm install
2332
2433 - name : Code Linting
25- run : npm run lint
34+ run : pnpm run lint
35+
36+ - name : Build
37+ run : pnpm build
38+ env :
39+ DIRECTUS_URL : ${{ secrets.DIRECTUS_URL }}
40+ DIRECTUS_TOKEN : ${{ secrets.DIRECTUS_TOKEN }}
2641
27- build :
28- name : Build
42+
43+ publish :
44+ name : Publish image
2945 if : github.ref == 'refs/heads/main' && success()
30- needs : linting
46+ needs : validate
3147 runs-on : ubuntu-latest
3248 steps :
3349 - name : Checkout
34- uses : actions/checkout@v5
50+ uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3551
3652 - name : Login Github Container Registry
37- uses : docker/login-action@v3
53+ uses : docker/login-action@af1e73f918a031802d376d3c8bbc3fe56130a9b0 # v4.4.0
3854 with :
3955 registry : ghcr.io
4056 username : ${{ github.actor }}
4157 password : ${{ secrets.GITHUB_TOKEN }}
4258
4359 - name : scrumlr.io - Landing Page - Build
4460 id : meta-landing-page
45- uses : docker/metadata-action@v5
61+ uses : docker/metadata-action@dc802804100637a589fabce1cb79ff13a1411302 # v6.2.0
4662 with :
4763 images : |
4864 ghcr.io/inovex/scrumlr.io-landing-page/image
@@ -60,13 +76,13 @@ jobs:
6076 org.opencontainers.image.licenses=MIT
6177 org.opencontainers.image.title=scrumlr.io - Landing Page
6278 org.opencontainers.image.description=The landing page of scrumlr.io
63-
79+
6480 - name : Set up Docker buildx
65- uses : docker/setup-buildx-action@v3
81+ uses : docker/setup-buildx-action@bb05f3f5519dd87d3ba754cc423b652a5edd6d2c # v4.2.0
6682
6783 - name : Push landing page image
6884 id : push-landing-page
69- uses : docker/build-push-action@v6
85+ uses : docker/build-push-action@53b7df96c91f9c12dcc8a07bcb9ccacbed38856a # v7.3.0
7086 with :
7187 push : true
7288 platforms : linux/amd64,linux/arm64
0 commit comments