Skip to content

sync(hok_env): update code #11

sync(hok_env): update code

sync(hok_env): update code #11

Workflow file for this run

name: cpu
on:
push:
branches:
- 'master'
tags:
- 'v*.*.*'
pull_request:
branches:
- 'master'
jobs:
docker:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: nschloe/action-cached-lfs-checkout@v1
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
-
name: Login to DockerHub
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
-
name: Docker meta
id: meta_cpu_base
uses: docker/metadata-action@v4
with:
images: |
tencentailab/hok_env
flavor: |
prefix=cpu_base_
tags: |
type=semver,pattern={{raw}}
type=sha,prefix=cpu_base_
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_cpu_base.outputs.tags }}
labels: ${{ steps.meta_cpu_base.outputs.labels }}
file: dockerfile/dockerfile.base.cpu
cache-from: type=registry,ref=tencentailab/hok_env:buildcache_cpu_base
cache-to: type=registry,ref=tencentailab/hok_env:buildcache_cpu_base,mode=max
build-args: |
BASE_IMAGE=tencentailab/hok_env:base_common_py37_base_v1.2.0
-
name: Docker meta
id: meta_cpu
uses: docker/metadata-action@v4
with:
images: |
tencentailab/hok_env
flavor: |
prefix=cpu_
tags: |
type=semver,pattern={{raw}}
type=sha,prefix=cpu_
-
name: Build and push
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_cpu.outputs.tags }}
labels: ${{ steps.meta_cpu.outputs.labels }}
file: dockerfile/dockerfile.dev
cache-from: type=registry,ref=tencentailab/hok_env:buildcache_cpu
cache-to: type=registry,ref=tencentailab/hok_env:buildcache_cpu,mode=max
build-args: |
BASE_IMAGE=tencentailab/hok_env:cpu_base_v1.2.0
-
name: Docker meta 3v3
id: meta_cpu_3v3
uses: docker/metadata-action@v4
with:
images: |
tencentailab/hok_env
flavor: |
prefix=cpu_3v3_
tags: |
type=semver,pattern={{raw}}
type=sha,prefix=cpu_3v3_
-
name: Build and push 3v3
uses: docker/build-push-action@v3
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta_cpu_3v3.outputs.tags }}
labels: ${{ steps.meta_cpu_3v3.outputs.labels }}
file: dockerfile/dockerfile.dev.3v3
cache-from: type=registry,ref=tencentailab/hok_env:buildcache_cpu_3v3
cache-to: type=registry,ref=tencentailab/hok_env:buildcache_cpu_3v3,mode=max
build-args: |
BASE_IMAGE=tencentailab/hok_env:cpu_base_v1.2.0