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:
|
on:
|
||||||
push:
|
push:
|
||||||
# branches:
|
|
||||||
# - 'main'
|
|
||||||
# paths-ignore:
|
|
||||||
# - '**.md'
|
|
||||||
# - '**.yml'
|
|
||||||
paths:
|
paths:
|
||||||
- 'requirements.txt'
|
- 'requirements.txt'
|
||||||
- 'Dockerfile'
|
- 'Dockerfile'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
-
|
- name: Checkout code
|
||||||
name: Login to Docker Hub
|
uses: actions/checkout@v2
|
||||||
uses: docker/login-action@v3.0.0
|
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:
|
with:
|
||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
-
|
|
||||||
name: Build and push GPU
|
- name: Build and push GPU Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
|
context: .
|
||||||
push: true
|
push: true
|
||||||
tags: mccloud/subgen:latest
|
tags: |
|
||||||
|
mccloud/subgen:latest
|
||||||
|
mccloud/subgen:${{ steps.setcalver.outputs.package_version }}
|
||||||
|
|||||||
Reference in New Issue
Block a user