12
12
steps :
13
13
- uses : actions/checkout@v3
14
14
15
+ - name : Set up Node.js
16
+ uses : actions/setup-node@v3
17
+ with :
18
+ node-version : ' 22.x'
19
+
20
+ - name : Install pnpm and NestJS CLI
21
+ run : npm install -g pnpm @nestjs/cli
22
+
23
+ - name : Install dependencies
24
+ run : pnpm install
25
+
26
+ - name : Build the project
27
+ run : pnpm run build
28
+
15
29
- name : Get latest version from Docker Hub excluding 'latest'
16
30
id : docker_version
17
31
run : |
@@ -24,32 +38,33 @@ jobs:
24
38
25
39
echo "Latest version is $LATEST_VERSION"
26
40
echo "New version is $NEW_VERSION"
27
- echo ::set-output name= version:: $NEW_VERSION
41
+ echo " version= $NEW_VERSION" >> $GITHUB_ENV
28
42
29
43
- name : Log in to Docker Hub
30
- uses : docker/login-action@v1
44
+ uses : docker/login-action@v2
31
45
with :
32
46
username : ${{ secrets.DOCKER_HUB_USERNAME }}
33
47
password : ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
34
48
35
49
- name : Build and push Docker image
36
- uses : docker/build-push-action@v2
50
+ uses : docker/build-push-action@v3
37
51
with :
38
52
context : .
39
53
file : ./Dockerfile
40
54
push : true
41
55
tags : |
42
56
softagon/eduprimecore:latest
43
- softagon/eduprimecore:${{ steps.docker_version.outputs.version }}
57
+ softagon/eduprimecore:${{ env.version }}
58
+
44
59
- name : Create GitHub Release
45
60
uses : actions/create-release@v1
46
61
env :
47
62
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
48
63
with :
49
- tag_name : ${{ steps.docker_version.outputs .version }}
50
- release_name : Release ${{ steps.docker_version.outputs .version }}
64
+ tag_name : ${{ env .version }}
65
+ release_name : Release ${{ env .version }}
51
66
body : |
52
67
## Changes
53
- - Docker image version ${{ steps.docker_version.outputs .version }} released.
68
+ - Docker image version ${{ env .version }} released.
54
69
draft : false
55
70
prerelease : false
0 commit comments