-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8336141
commit e11be73
Showing
1 changed file
with
8 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,19 +11,22 @@ jobs: | |
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Get NPM version | ||
- name: Extract Version from package.json | ||
id: package-version | ||
uses: martinbeentjes/[email protected] | ||
run: | | ||
VERSION=$(node -e "console.log(require('./package.json').version)") | ||
echo "Version extracted from package.json: $VERSION" | ||
echo "::set-output name=tag::$VERSION" | ||
- run: echo ${{ steps.package-version.outputs.current-version}} | ||
- run: echo ${{ steps.package-version.outputs.tag }} | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Build the Docker image | ||
run: docker build . --file Dockerfile --tag portfolio:${{ steps.package-version.outputs.current-version}} | ||
run: docker build . --file Dockerfile --tag portfolio:${{ steps.package-version.outputs.tag }} | ||
|
||
- name: Build and push to local registry | ||
uses: docker/build-push-action@v6 | ||
with: | ||
push: true | ||
tags: registry.zoutigewolf.dev/portfolio/portfolio:${{ steps.package-version.outputs.current-version}} | ||
tags: registry.zoutigewolf.dev/portfolio/portfolio:${{ steps.package-version.outputs.tag }} |