Skip to content

ci

ci #11

name: ci
on:
workflow_dispatch:
inputs:
docker_tag:
description: 'Docker image tag'
required: true
default: '0.0.1'
jobs:
login-build-push:
runs-on: ubuntu-latest
steps:
-
name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: iliusa77/hello-world-python:${{ inputs.docker_tag }}
-
name: Run
uses: addnab/docker-run-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
registry: docker.io
image: iliusa77/hello-world-python:${{ inputs.docker_tag }}
run: nohup python3 ./app.py &