Skip to content

Commit

Permalink
Create docker-aliyun-mdrive.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
trueai-org authored Jun 18, 2024
1 parent 2c0ac17 commit 4b6630f
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/docker-aliyun-mdrive.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Alibaba Cloud Registry Docker Image CI

on:
release:
types: [published]

jobs:
push_to_acr:
name: Push Docker image to Alibaba Cloud Registry
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4

- name: Log in to Alibaba Cloud Registry
run: |
echo "${{ secrets.ACR_PASSWORD }}" | docker login --username="${{ secrets.ACR_USERNAME }}" --password-stdin ${{ secrets.ACR_REGISTRY }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v1
with:
images: ${{ secrets.ACR_REGISTRY }}/trueai-org/mdrive

- name: Build and push Docker image to Alibaba Cloud Registry
uses: docker/build-push-action@v2
with:
context: .
file: ./src/MDriveSync.Client.API/Dockerfile
push: true
tags: ${{ secrets.ACR_REGISTRY }}/trueai-org/mdrive:${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit 4b6630f

Please sign in to comment.