Skip to content

Build docker update image #12

Build docker update image

Build docker update image #12

Workflow file for this run

## https://docs.docker.com/ci-cd/github-actions
name: Build docker update image
on:
workflow_dispatch:
inputs:
branch:
description: 'Branch to build'
required: true
default: 'master'
update_playdata:
description: 'Update playdata package'
required: true
type: boolean
default: true
update_bigdash:
description: 'Update bigdash package'
required: true
type: boolean
default: true
update_playbase:
description: 'Update playbase package'
required: true
type: boolean
default: true
workflow_run:
workflows: ["update OPG version"]
types:
- completed
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
with:
ref: master
-
name: Get version
id: get_version
run: |
VERSION=$(cat VERSION | cut -d'+' -f1)
echo "VERSION=$VERSION" >> $GITHUB_OUTPUT
-
name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
-
name: Build and push
uses: docker/build-push-action@v2
with:
context: .
file: ./docker/Dockerfile.update
push: true
no-cache: true
build-args: |
BRANCH=${{ github.event.inputs.branch }}
update_playdata=${{ github.event.inputs.update_playdata }}
update_bigdash=${{ github.event.inputs.update_bigdash }}
update_playbase=${{ github.event.inputs.update_playbase }}
tags: |
${{ github.event.inputs.branch == 'master' && format('{0}/omicsplayground:{1},{0}/omicsplayground:latest', secrets.DOCKERHUB_USERNAME, steps.get_version.outputs.VERSION) || '' }}
${{ github.event.inputs.branch != 'master' && format('{0}/omicsplayground:{1}', secrets.DOCKERHUB_USERNAME, github.event.inputs.branch) || '' }}