-
Notifications
You must be signed in to change notification settings - Fork 1
47 lines (42 loc) · 1.26 KB
/
dockerify.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
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 }}