Re-enable docker image builds
This commit re-enables docker image builds which was moved to a different CI server in a previous commit. Signed-off-by: Sayan Nandan <nandansayan@outlook.com>next
parent
7a7b0fee49
commit
5391f2a694
@ -0,0 +1,39 @@
|
|||||||
|
name: Docker image
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
# Publish `next` as Docker `latest` image.
|
||||||
|
branches:
|
||||||
|
- next
|
||||||
|
|
||||||
|
# Publish `v1.2.3` tags as releases.
|
||||||
|
tags:
|
||||||
|
- v*
|
||||||
|
|
||||||
|
env:
|
||||||
|
IMAGE_NAME: tdb
|
||||||
|
BUILD: "false"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 2
|
||||||
|
- name: Setup environment
|
||||||
|
run: |
|
||||||
|
chmod +x ci/buildvars.sh
|
||||||
|
ci/buildvars.sh
|
||||||
|
- name: Build image
|
||||||
|
run: docker build . --file Dockerfile --tag $IMAGE_NAME
|
||||||
|
if: env.BUILD == 'true' || github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
|
||||||
|
- name: Push to Docker Hub
|
||||||
|
uses: docker/build-push-action@v1
|
||||||
|
with:
|
||||||
|
username: ${{ secrets.DOCKER_USERNAME }}
|
||||||
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
|
repository: terrabasedb/tdb
|
||||||
|
tags: latest
|
||||||
|
tag_with_ref: true
|
||||||
|
if: env.BUILD == 'true' || github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
|
Loading…
Reference in New Issue