-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
chengscai
committed
Jun 7, 2024
1 parent
cc362ef
commit efab2b7
Showing
1 changed file
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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-gateway:latest . | ||
|
||
- name: Push Docker image | ||
run: docker push ${{ secrets.ALICLOUD_REGISTRY }}/ss1917/codo-gateway:latest |