diff options
author | Navan Chauhan <navanchauhan@gmail.com> | 2020-09-12 16:54:29 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-12 16:54:29 +0530 |
commit | b29aead7e22f084721dd2a6c48a06dea9fc71390 (patch) | |
tree | f8276c6248c17b6eadf161c2cad10787e9145554 /.github/workflows | |
parent | 2600eed29041798c11328882baf9857ac026e8d9 (diff) |
Create dev-build.yml
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/dev-build.yml | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/dev-build.yml b/.github/workflows/dev-build.yml new file mode 100644 index 0000000..f359363 --- /dev/null +++ b/.github/workflows/dev-build.yml @@ -0,0 +1,36 @@ +name: Curie-CLI Build + +on: + push: + branches: + - dev + +jobs: + docker-hub: + name: Deployment + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Prepare + id: prepare + run: | + DOCKER_IMAGE=navanchauhan/curie-cli + DOCKER_PLATFORMS=linux/amd64,linux/arm64 + VERSION=dev + TAGS="--tag ${DOCKER_IMAGE}:${VERSION}" + echo ::set-output name=docker_image::${DOCKER_IMAGE} + echo ::set-output name=version::${VERSION} + echo ::set-output name=buildx_args::--platform ${DOCKER_PLATFORMS} \ + --build-arg VERSION=${VERSION} \ + --build-arg BUILD_DATE=$(date -u +'%Y-%m-%dT%H:%M:%SZ') \ + --build-arg VCS_REF=${GITHUB_SHA::8} \ + ${TAGS} --file ./Dockerfile ./ + - name: Prepare Buildx + uses: crazy-max/ghaction-docker-buildx@v3 + - name: Docker Login + env: + DOCKER_USERNAME: ${{ secrets.DOCKER_HUB_USER }} + DOCKER_PASSWORD: ${{ secrets.DOCKER_HUB_TOKEN }} + run: echo "${DOCKER_PASSWORD}" | docker login --username "${DOCKER_USERNAME}" --password-stdin + - name: Docker Buildx (push) + run: docker buildx build --output "type=image,push=true" ${{ steps.prepare.outputs.buildx_args }} |