Skip to content

Test: Modify FindMKL.cmake (DO NOT MERGE) #2981

Test: Modify FindMKL.cmake (DO NOT MERGE)

Test: Modify FindMKL.cmake (DO NOT MERGE) #2981

Workflow file for this run

name: Container
on:
pull_request: # 当有 PR 指向 develop 分支时触发
branches:
- develop
push:
branches:
- develop
tags:
- 'v*'
workflow_dispatch:
jobs:
build_container_and_push:
runs-on: X64
if: github.repository_owner == 'deepmodeling'
strategy:
matrix:
dockerfile: ["intel"]
# dockerfile: ["gnu","intel","cuda"]
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}
dp-harbor-registry.us-east-1.cr.aliyuncs.com/deepmodeling/abacus-${{ matrix.dockerfile }}
tags: |
type=semver,pattern={{version}},enable=${{ github.ref_type == 'tag' }}
type=raw,value=latest
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Aliyun Registry
# 只有在不是由 fork 的 PR 触发时才执行
if: github.event.pull_request.head.repo.full_name == github.repository
uses: docker/login-action@v3
with:
registry: dp-harbor-registry.us-east-1.cr.aliyuncs.com
username: ${{ secrets.DP_HARBOR_USERNAME }}
password: ${{ secrets.DP_HARBOR_PASSWORD }}
- name: Build and Push Container
uses: docker/build-push-action@v6
with:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
file: Dockerfile.${{ matrix.dockerfile }}
# 只有在 develop 分支或打标签时才推送,PR时不推送
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=registry,ref=ghcr.io/deepmodeling/abacus-${{ matrix.dockerfile }}:latest
cache-to: type=inline