Skip to content

Commit

Permalink
2024年6月06日 添加自动构建
Browse files Browse the repository at this point in the history
  • Loading branch information
ss1917 committed Jun 6, 2024
1 parent 59c0408 commit 11409b7
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 2 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build_docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build and Push Docker Image to Alibaba Cloud

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Login to Alibaba Cloud Container Registry
env:
DOCKER_REGISTRY: ${{ secrets.ALICLOUD_REGISTRY }}
DOCKER_USERNAME: ${{ secrets.ALICLOUD_USERNAME }}
DOCKER_PASSWORD: ${{ secrets.ALICLOUD_PASSWORD }}
run: |
echo $DOCKER_PASSWORD | docker login --username=$DOCKER_USERNAME --password-stdin $DOCKER_REGISTRY
- name: Build Docker image
run: docker build -t ${{ secrets.ALICLOUD_REGISTRY }}/ss1917/codo-admin:latest .

- name: Push Docker image
run: docker push ${{ secrets.ALICLOUD_REGISTRY }}/ss1917/codo-admin:latest
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ ENV/

# mkdocs documentation
/site
.github/
.github/*
#.github/
#.github/*

# mypy
.mypy_cache/
Expand Down

0 comments on commit 11409b7

Please sign in to comment.