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