Skip to content

Commit

Permalink
docker
Browse files Browse the repository at this point in the history
  • Loading branch information
ZoutigeWolf committed Jul 1, 2024
1 parent 8336141 commit e11be73
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}

0 comments on commit e11be73

Please sign in to comment.