diff --git a/.github/workflows/build_GPU.yml b/.github/workflows/build_GPU.yml index a262dab..ebf876f 100644 --- a/.github/workflows/build_GPU.yml +++ b/.github/workflows/build_GPU.yml @@ -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 }}