Skip to content

Update Dockerfile_talib_debian_gnu_linux #40

Update Dockerfile_talib_debian_gnu_linux

Update Dockerfile_talib_debian_gnu_linux #40

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Declare env variables
id: vars
shell: bash
run: |
GITHUB_REF=${GITHUB_REF#refs/tags/}
echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
echo "::set-output name=sha_short::$(git rev-parse --short HEAD)"
CURRENT_VERSION=`grep -o "'.*'" nseta/__init__.py | sed "s/'//g"`
THIS_VERSION=${CURRENT_VERSION}.${{github.run_number}}
echo "##[set-output name=THIS_VERSION;]$(echo ${THIS_VERSION})"
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Publish latest image to Docker Hub
run: |
docker build . -f Dockerfile -t pkjmesra/nseta:latest
docker push pkjmesra/nseta:latest
- name: Publish release version image to Docker Hub
if: startsWith(github.ref, 'refs/tags')
run: |
docker build . -f Dockerfile -t pkjmesra/nseta:${{ steps.vars.outputs.THIS_VERSION }}
docker push pkjmesra/nseta:${{ steps.vars.outputs.THIS_VERSION }}