Update build_GPU.yml to add versions
This commit is contained in:
33
.github/workflows/build_GPU.yml
vendored
33
.github/workflows/build_GPU.yml
vendored
@@ -2,31 +2,40 @@ name: Build_Subgen_Dockerfile_GPU
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches:
|
||||
# - 'main'
|
||||
# paths-ignore:
|
||||
# - '**.md'
|
||||
# - '**.yml'
|
||||
paths:
|
||||
- 'requirements.txt'
|
||||
- 'Dockerfile'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3.0.0
|
||||
- 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
|
||||
|
||||
- name: Build and push GPU Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: true
|
||||
tags: mccloud/subgen:latest
|
||||
tags: |
|
||||
mccloud/subgen:latest
|
||||
mccloud/subgen:${{ steps.setcalver.outputs.package_version }}
|
||||
|
||||
Reference in New Issue
Block a user