mirror of
https://github.com/nosqlbench/nosqlbench.git
synced 2025-01-11 00:12:04 -06:00
commit
477af8c7bc
34
.github/workflows/dockerhub.yml
vendored
Normal file
34
.github/workflows/dockerhub.yml
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
# This is a basic workflow to help you get started with Actions
|
||||
|
||||
name: dockerhub
|
||||
|
||||
on:
|
||||
push:
|
||||
# Sequence of patterns matched against refs/tags
|
||||
tags:
|
||||
- 'nosqlbench-*' # Push events to matching nosqlbench-[version]
|
||||
|
||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||
jobs:
|
||||
# This workflow contains a single job called "build"
|
||||
build:
|
||||
# The type of runner that the job will run on
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
|
||||
- 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
|
Loading…
Reference in New Issue
Block a user