Skip to content

dockerify

dockerify #242

Workflow file for this run

name: dockerify
on:
workflow_run:
workflows:
- deploy
types:
- completed
branches:
- master
- main
- develop
workflow_dispatch:
env:
PROJECT_NAME: psyki-python
WORKFLOW: dockerify
RETRY_TIME: 5m
MAX_RETRIES: 3
jobs:
dockerify:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
name: Dockerify with Jupyter support
steps:
- name: Docker Login
run: docker login -u ${{ secrets.DOCKERHUB_USERNAME }} -p ${{ secrets.DOCKERHUB_PASSWORD }}
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # all history
submodules: recursive
- name: Get All Tags
run: git fetch --tags -f
- name: Get Version
id: get-version
run: echo ::set-output name=version::$(python setup.py get_project_version | tail -n 1)
- name: Create Docker Image
run: ./.github/scripts/retry.sh "docker build -t pikalab/psyki:$PSYKI_VERSION --build-arg PSYKI_VERSION=$PSYKI_VERSION ."
shell: bash
env:
PSYKI_VERSION: '${{ steps.get-version.outputs.version }}'
- name: Push Image on Docker Hub
run: docker push pikalab/psyki:${{ steps.get-version.outputs.version }}