From 04169ddb92f3d472b089b819e31ea63d816b996f Mon Sep 17 00:00:00 2001 From: syroegkin Date: Mon, 28 Oct 2024 22:54:06 +0100 Subject: [PATCH] fix(docker): fix docker image build script --- .circleci/config.yml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index 24a1ed3..b3ba19c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -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: