42 lines
959 B
YAML
42 lines
959 B
YAML
name: Build_Subgen_Dockerfile_GPU
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- 'requirements.txt'
|
|
- 'Dockerfile'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
docker:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set Calver Version
|
|
uses: Nelyx/action-calver@v1.0.0
|
|
id: setcalver
|
|
with:
|
|
default_branch: 'refs/heads/main'
|
|
format: 'YYYY.M.D'
|
|
version_prefix: ''
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
|
|
|
- name: Build and push GPU Docker image
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
push: true
|
|
tags: |
|
|
mccloud/subgen:latest
|
|
mccloud/subgen:${{ steps.setcalver.outputs.package_version }}
|