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

Commit

Permalink
fix: try to fix workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
hermesalvesbr committed May 24, 2024
1 parent 79828ec commit 5c69858
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 64 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,20 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22.x'

- name: Install pnpm and NestJS CLI
run: npm install -g pnpm @nestjs/cli

- name: Install dependencies
run: pnpm install

- name: Build the project
run: pnpm run build

- name: Get latest version from Docker Hub excluding 'latest'
id: docker_version
run: |
Expand All @@ -24,32 +38,33 @@ jobs:
echo "Latest version is $LATEST_VERSION"
echo "New version is $NEW_VERSION"
echo ::set-output name=version::$NEW_VERSION
echo "version=$NEW_VERSION" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
file: ./Dockerfile
push: true
tags: |
softagon/eduprimecore:latest
softagon/eduprimecore:${{ steps.docker_version.outputs.version }}
softagon/eduprimecore:${{ env.version }}
- name: Create GitHub Release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.docker_version.outputs.version }}
release_name: Release ${{ steps.docker_version.outputs.version }}
tag_name: ${{ env.version }}
release_name: Release ${{ env.version }}
body: |
## Changes
- Docker image version ${{ steps.docker_version.outputs.version }} released.
- Docker image version ${{ env.version }} released.
draft: false
prerelease: false
67 changes: 10 additions & 57 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 5c69858

Please sign in to comment.