refactor: rename docker
commands to ci
This commit is contained in:
parent
45ab483e66
commit
84536d0508
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -27,8 +27,8 @@ jobs:
|
|||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- run: cp .env.example .env
|
||||
- run: ./run docker:build-images
|
||||
- run: ./run docker:push-images
|
||||
- run: ./run ci:build-images
|
||||
- run: ./run ci:push-images
|
||||
|
||||
- name: Add the deployment SSH key
|
||||
uses: shimataro/ssh-key-action@6f350ca8484d8d55c2e361e74d17e638dabe713a # 2.1.0
|
||||
|
|
26
run
26
run
|
@ -13,6 +13,19 @@ fi
|
|||
|
||||
DC="${DC:-exec}"
|
||||
|
||||
function ci:build-images {
|
||||
docker image build . \
|
||||
--file tools/docker/images/Dockerfile \
|
||||
--tag ${DOCKER_WEB_IMAGE_NAME}:${DOCKER_TAG} \
|
||||
--tag ${DOCKER_WEB_IMAGE_NAME}:latest \
|
||||
--target=production
|
||||
}
|
||||
|
||||
function ci:push-images {
|
||||
docker image push ${DOCKER_WEB_IMAGE_NAME}:${DOCKER_TAG}
|
||||
docker image push ${DOCKER_WEB_IMAGE_NAME}:latest
|
||||
}
|
||||
|
||||
function cmd {
|
||||
# Run any command in the app container.
|
||||
_dc app "${@}"
|
||||
|
@ -27,19 +40,6 @@ function deploy {
|
|||
cd tools/deployment && ansible-playbook deploy.yml
|
||||
}
|
||||
|
||||
function docker:build-images {
|
||||
docker image build . \
|
||||
--file tools/docker/images/Dockerfile \
|
||||
--tag ${DOCKER_WEB_IMAGE_NAME}:${DOCKER_TAG} \
|
||||
--tag ${DOCKER_WEB_IMAGE_NAME}:latest \
|
||||
--target=production
|
||||
}
|
||||
|
||||
function docker:push-images {
|
||||
docker image push ${DOCKER_WEB_IMAGE_NAME}:${DOCKER_TAG}
|
||||
docker image push ${DOCKER_WEB_IMAGE_NAME}:latest
|
||||
}
|
||||
|
||||
function help {
|
||||
printf "%s <task> [args]\n\nTasks:\n" "${0}"
|
||||
|
||||
|
|
Loading…
Reference in a new issue