Skip to content

Commit

Permalink
Merge pull request #354 from kbase/autobuild_docker_images
Browse files Browse the repository at this point in the history
Adding kb-sdk image build and upload to Dockerhub to GitHub actions
  • Loading branch information
ialarmedalien authored Sep 12, 2020
2 parents 782e415 + b7b7d16 commit ebfcf73
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/kb_sdk-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -134,3 +134,33 @@ jobs:
with:
name: kbaseapp-${{ matrix.app }}-${{ matrix.os }}
path: kbase_app

dockerhub_upload:
runs-on: ubuntu-latest
if: |
(github.ref == 'refs/heads/develop' || github.ref == 'refs/heads/master') &&
github.event_name == 'push' &&
!contains(github.event.head_commit.message, 'skip docker') &&
!contains(github.event.head_commit.message, 'skip ci')
needs:
- test_existing_repos
- test_kb-sdk_builds

steps:
- name: checkout git repo
uses: actions/checkout@v2

- name: set current branch name as TAG_NAME for docker image
shell: bash
run: echo "::set-env name=TAG_NAME::${GITHUB_REF#refs/heads/}"

- name: build and push to dockerhub
uses: opspresso/action-docker@master
with:
args: --docker
env:
USERNAME: ${{ secrets.DOCKER_USERNAME }}
PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
DOCKERFILE: "Dockerfile"
IMAGE_NAME: "kbase/kb-sdk"

0 comments on commit ebfcf73

Please sign in to comment.