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 e11be73 commit d6f6735
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/docker-image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,19 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Extract Version from package.json
id: package-version
run: |
VERSION=$(node -e "console.log(require('./package.json').version)")
echo "Version extracted from package.json: $VERSION"
echo "::set-output name=tag::$VERSION"
- uses: actions/checkout@v4

- run: echo ${{ steps.package-version.outputs.tag }}
- name: Get NPM version
id: package-version
uses: martinbeentjes/[email protected]

- uses: actions/checkout@v4
- run: echo ${{ steps.package-version.outputs.current-version}}

- name: Build the Docker image
run: docker build . --file Dockerfile --tag portfolio:${{ steps.package-version.outputs.tag }}
run: docker build . --file Dockerfile --tag portfolio:${{ steps.package-version.outputs.current-version}}

- 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.tag }}
tags: registry.zoutigewolf.dev/portfolio/portfolio:${{ steps.package-version.outputs.current-version}}

0 comments on commit d6f6735

Please sign in to comment.