mirror of
https://github.com/0glabs/0g-chain.git
synced 2024-12-26 08:15:19 +00:00
Automate docker build and upload (#703)
* add basic master builds * fix branch name * tidy up * update to work from master
This commit is contained in:
parent
1442deb3dc
commit
36a32d7962
@ -103,6 +103,24 @@ jobs:
|
||||
target: link-check
|
||||
description: "Check url links are not broken"
|
||||
|
||||
docker-build-and-push:
|
||||
# adapted from: https://circleci.com/blog/using-circleci-workflows-to-replicate-docker-hub-automated-builds/
|
||||
environment:
|
||||
IMAGE_NAME: kava/kava
|
||||
docker:
|
||||
- image: circleci/buildpack-deps:stretch
|
||||
steps:
|
||||
- checkout
|
||||
- setup_remote_docker
|
||||
- run:
|
||||
name: Build Docker image
|
||||
command: docker build -t $IMAGE_NAME:$CIRCLE_BRANCH .
|
||||
- run:
|
||||
name: Publish Docker Image to Docker Hub
|
||||
command: |
|
||||
echo "$DOCKERHUB_KEY" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
|
||||
docker push $IMAGE_NAME:$CIRCLE_BRANCH
|
||||
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
@ -127,3 +145,9 @@ workflows:
|
||||
- broken-link-check:
|
||||
requires:
|
||||
- setup-dependencies
|
||||
upload-docker-images:
|
||||
jobs:
|
||||
- docker-build-and-push:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
Loading…
Reference in New Issue
Block a user