Skip to content

dev2main ready for release. (#123) #24

dev2main ready for release. (#123)

dev2main ready for release. (#123) #24

Workflow file for this run

name: Build Image
on:
workflow_dispatch:
push:
tags:
- 'v*'
jobs:
build_container_and_push:
runs-on: ubuntu-latest
if: github.repository_owner == 'deepmodeling'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Docker meta
id: meta
uses: docker/metadata-action@v4
with:
images: |
ghcr.io/deepmodeling/deeptb
registry.dp.tech/deepmodeling/deeptb
tags: |
type=semver,pattern={{version}}
type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' }}
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Login to Aliyun Registry
uses: docker/login-action@v2
with:
registry: registry.dp.tech
username: ${{ secrets.DP_HARBOR_USERNAME }}
password: ${{ secrets.DP_HARBOR_PASSWORD }}
- name: Build and Push Container
uses: docker/build-push-action@v5
with:
tags: ${{ steps.meta.outputs.tags }}
file: Dockerfile
push: true
labels: ${{ steps.meta.outputs.labels }}