Update build_GPU_Compute5.yml
This commit is contained in:
26
.github/workflows/build_GPU_Compute5.yml
vendored
26
.github/workflows/build_GPU_Compute5.yml
vendored
@@ -1,4 +1,4 @@
|
|||||||
name: Build_Subgen_Dockerfile_GPU_Compute5
|
name: Build_Subgen_Dockerfile_Compute5
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -10,12 +10,16 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
platform:
|
||||||
|
- linux/amd64
|
||||||
|
- linux/arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
with:
|
|
||||||
fetch-depth: 0
|
|
||||||
|
|
||||||
- name: Get version from subgen.py
|
- name: Get version from subgen.py
|
||||||
id: get_version
|
id: get_version
|
||||||
@@ -23,17 +27,25 @@ jobs:
|
|||||||
version=$(grep -oP "subgen_version\s*=\s*'\K[^']+" subgen.py)
|
version=$(grep -oP "subgen_version\s*=\s*'\K[^']+" subgen.py)
|
||||||
echo "version=$version" >> $GITHUB_ENV
|
echo "version=$version" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- 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
|
- name: Login to Docker Hub
|
||||||
uses: docker/login-action@v3
|
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 Docker image
|
- name: Build and push CPU Docker image
|
||||||
uses: docker/build-push-action@v5
|
uses: docker/build-push-action@v5
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
|
platforms: linux/amd64,linux/arm64
|
||||||
|
file: ./Dockerfile.compute5
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
mccloud/subgen:compute5
|
mccloud/subgen:compute5
|
||||||
mccloud/subgen:compute5-${{ env.version }}
|
mccloud/subgen:${{ env.version }}-compute5
|
||||||
|
|||||||
Reference in New Issue
Block a user