1
0
Fork 0
monkeeShark/.circleci/config.yml

50 lines
1.2 KiB
YAML
Raw Normal View History

version: 2.1
2018-10-29 12:48:35 +00:00
executors:
docker:
working_directory: /tmp/workspace
2018-10-26 18:46:48 +00:00
docker:
2020-12-28 22:23:04 +00:00
- image: docker:latest
jobs:
docker:
parameters:
with_deploy:
type: boolean
default: false
executor: docker
2018-10-26 18:46:48 +00:00
steps:
- checkout
2020-11-15 07:06:18 +00:00
- setup_remote_docker:
version: 19.03.13
2018-10-26 18:46:48 +00:00
- run:
name: Build
2018-10-26 18:46:48 +00:00
command: |
2018-11-06 17:06:32 +00:00
docker build -t misskey/misskey .
- when:
condition: <<parameters.with_deploy>>
steps:
- run:
name: Deploy
command: |
2018-10-31 13:00:21 +00:00
if [ "$DOCKERHUB_USERNAME$DOCKERHUB_PASSWORD" ]
then
2018-11-11 12:34:50 +00:00
apk update && apk add jq
docker tag misskey/misskey misskey/misskey:$(cat package.json | jq -r .version)
2018-10-31 13:00:21 +00:00
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
docker push -a misskey/misskey
2018-10-31 13:00:21 +00:00
else
echo -e '\033[0;33mAborted deploying to Docker Hub\033[0;39m'
fi
2018-10-26 18:46:48 +00:00
workflows:
version: 2
docker:
jobs:
- docker:
name: auto-build
with_deploy: true
filters:
branches:
only: master