Files
bigcapital/.circleci/config.yml
2021-09-28 11:55:11 +02:00

55 lines
1.6 KiB
YAML

# This config is equivalent to both the '.circleci/extended/orb-free.yml' and the base '.circleci/config.yml'
version: 2.1
orbs:
slack: circleci/slack@4.4.4
jobs:
build:
working_directory: ~/app
docker:
- image: docker:17.05.0-ce-git
steps:
- checkout:
path: ~/app
- setup_remote_docker:
version: 19.03.13
- restore_cache:
keys:
- v1-{{ .Branch }}
paths:
- /caches/app.tar
- run:
name: Load Docker image layer cache
command: |
set +o pipefail
docker load -i /caches/app.tar | true
- run:
name: Build application Docker image
command: |
docker build \
--build-arg GITHUB_USERNAME=$GITHUB_USERNAME \
--build-arg GITHUB_PASS=$GITHUB_PASS \
--build-arg GITHUB_EMAIL=$GITHUB_EMAIL \
-t abouhuolia/bigcapital-client:latest .
- run:
name: Save Docker image layer cache
command: |
mkdir -p /caches
docker save -o /caches/app.tar abouhuolia/bigcapital-client
- save_cache:
key: v1-{{ .Branch }}-{{ epoch }}
paths:
- /caches/app.tar
- run:
name: Publish Docker Image to Docker Hub
command: |
docker login -u abouhuolia -p 1532015325_ASdfqwer
docker push abouhuolia/bigcapital-client:latest
workflows:
build_and_publish: # name of your workflow
jobs:
- build:
filters:
branches:
only: master