Update build_CPU.yml to add version to dockerhub
This commit is contained in:
34
.github/workflows/build_CPU.yml
vendored
34
.github/workflows/build_CPU.yml
vendored
@@ -2,18 +2,12 @@ name: Build_Subgen_Dockerfile_CPU
|
||||
|
||||
on:
|
||||
push:
|
||||
# branches:
|
||||
# - 'main'
|
||||
# paths-ignore:
|
||||
# - '**.md'
|
||||
# - '**.yml'
|
||||
paths:
|
||||
- 'requirements.txt'
|
||||
- 'Dockerfile.cpu'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
|
||||
docker:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
@@ -22,24 +16,38 @@ jobs:
|
||||
platform:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- 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: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
-
|
||||
name: Login to Docker Hub
|
||||
uses: docker/login-action@v3.0.0
|
||||
|
||||
- name: Login to Docker Hub
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
-
|
||||
name: Build and push CPU
|
||||
|
||||
- name: Build and push CPU Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
platforms: linux/amd64, linux/arm64
|
||||
context: .
|
||||
platforms: linux/amd64,linux/arm64
|
||||
file: ./Dockerfile.cpu
|
||||
push: true
|
||||
tags: mccloud/subgen:cpu
|
||||
tags: |
|
||||
mccloud/subgen:cpu
|
||||
mccloud/subgen:${{ steps.setcalver.outputs.package_version }}-cpu
|
||||
|
||||
Reference in New Issue
Block a user