mirror of
https://github.com/misskey-dev/misskey.git
synced 2024-12-29 20:39:15 +01:00
62b680cadd
* fix docker command on CI to push the image tagged with the version * fix docker cli version on CI for future-proofing
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
version: 2.1
|
|
|
|
executors:
|
|
docker:
|
|
working_directory: /tmp/workspace
|
|
docker:
|
|
- image: docker:12.10.1
|
|
|
|
jobs:
|
|
docker:
|
|
parameters:
|
|
with_deploy:
|
|
type: boolean
|
|
default: false
|
|
executor: docker
|
|
steps:
|
|
- checkout
|
|
- setup_remote_docker:
|
|
version: 19.03.13
|
|
- run:
|
|
name: Build
|
|
command: |
|
|
docker build -t misskey/misskey .
|
|
- when:
|
|
condition: <<parameters.with_deploy>>
|
|
steps:
|
|
- run:
|
|
name: Deploy
|
|
command: |
|
|
if [ "$DOCKERHUB_USERNAME$DOCKERHUB_PASSWORD" ]
|
|
then
|
|
apk update && apk add jq
|
|
docker tag misskey/misskey misskey/misskey:$(cat package.json | jq -r .version)
|
|
docker login -u $DOCKERHUB_USERNAME -p $DOCKERHUB_PASSWORD
|
|
docker push -a misskey/misskey
|
|
else
|
|
echo -e '\033[0;33mAborted deploying to Docker Hub\033[0;39m'
|
|
fi
|
|
|
|
workflows:
|
|
version: 2
|
|
docker:
|
|
jobs:
|
|
- docker:
|
|
name: auto-build
|
|
with_deploy: true
|
|
filters:
|
|
branches:
|
|
only: master
|