Skip to content
This repository was archived by the owner on Jun 4, 2024. It is now read-only.

Commit 5c69858

Browse files
committed
fix: try to fix workflow
1 parent 79828ec commit 5c69858

File tree

2 files changed

+32
-64
lines changed

2 files changed

+32
-64
lines changed

.github/workflows/docker-image.yml

+22-7
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,20 @@ jobs:
1212
steps:
1313
- uses: actions/checkout@v3
1414

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+
1529
- name: Get latest version from Docker Hub excluding 'latest'
1630
id: docker_version
1731
run: |
@@ -24,32 +38,33 @@ jobs:
2438
2539
echo "Latest version is $LATEST_VERSION"
2640
echo "New version is $NEW_VERSION"
27-
echo ::set-output name=version::$NEW_VERSION
41+
echo "version=$NEW_VERSION" >> $GITHUB_ENV
2842
2943
- name: Log in to Docker Hub
30-
uses: docker/login-action@v1
44+
uses: docker/login-action@v2
3145
with:
3246
username: ${{ secrets.DOCKER_HUB_USERNAME }}
3347
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}
3448

3549
- name: Build and push Docker image
36-
uses: docker/build-push-action@v2
50+
uses: docker/build-push-action@v3
3751
with:
3852
context: .
3953
file: ./Dockerfile
4054
push: true
4155
tags: |
4256
softagon/eduprimecore:latest
43-
softagon/eduprimecore:${{ steps.docker_version.outputs.version }}
57+
softagon/eduprimecore:${{ env.version }}
58+
4459
- name: Create GitHub Release
4560
uses: actions/create-release@v1
4661
env:
4762
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4863
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 }}
5166
body: |
5267
## Changes
53-
- Docker image version ${{ steps.docker_version.outputs.version }} released.
68+
- Docker image version ${{ env.version }} released.
5469
draft: false
5570
prerelease: false

pnpm-lock.yaml

+10-57
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)