diff --git a/.github/workflows/dockerpub.yml b/.github/workflows/dockerpub.yml new file mode 100644 index 000000000..1dd3eb9a1 --- /dev/null +++ b/.github/workflows/dockerpub.yml @@ -0,0 +1,26 @@ +name: dockerpub + +on: + push: + tags: nosqlbench-** + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Login to DockerHub Registry + run: echo ${{ secrets.DOCKERHUB_PASSWORD }} | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin + - name: Get the version + id: vars + run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10}) + - name: Build the tagged Docker image + run: docker build ./nb/ --file Dockerfile --tag nosqlbench/nosqlbench:${{steps.vars.outputs.tag}} + - name: Push the tagged Docker image + run: docker push nosqlbench/nosqlbench:${{steps.vars.outputs.tag}} + - name: Build the latest Docker image + run: docker build ./nb/ --file Dockerfile --tag nosqlbench/nosqlbench:latest + - name: Push the latest Docker image + run: docker push nosqlbench/nosqlbench:latest +