Skip to content

Commit

Permalink
fix(docker): fix docker image build script
Browse files Browse the repository at this point in the history
  • Loading branch information
syroegkin committed Oct 28, 2024
1 parent 23a97b0 commit 04169dd
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,31 @@ jobs:
name: Release a new version
command: npx semantic-release

build_image:
docker:
- image: cimg/base:current-22.04
steps:
- checkout
- run:
name: Install dependencies
command: apk add --no-cache jq
- setup_remote_docker:
docker_layer_caching: true
- run:
name: Build application Docker image
command: |
docker build -t app -f Dockerfile .
- deploy:
name: Push Docker images
command: |
docker login ghcr.io -u syroegkin -p${GITHUB_TOKEN}
docker tag app "ghcr.io/syroegkin/$(jq -r '.name' package.json):$(jq -r '.version' package.json)"
docker push "ghcr.io/syroegkin/$(jq -r '.name' package.json):$(jq -r '.version' package.json)"
docker tag app "ghcr.io/syroegkin/$(jq -r '.name' package.json):latest"
docker push "ghcr.io/syroegkin/$(jq -r '.name' package.json):latest"
build_image:
<<: *node_defaults
docker:
Expand Down

0 comments on commit 04169dd

Please sign in to comment.