forked from west2-online/DomTok
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (35 loc) · 1.11 KB
/
build.yaml
File metadata and controls
42 lines (35 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build and Push Docker Image
on:
workflow_dispatch:
inputs:
service:
description: "Select the service to build"
required: true
type: choice
options:
- gateway
- user
- assistant
- commodity
- cart
- order
- payment
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Log in to Alibaba Cloud Docker Registry
uses: docker/login-action@v3
with:
registry: ${{ secrets.ALIYUN_DOCKER_REGISTRY }}
username: ${{ secrets.ALIYUN_DOCKER_USER }}
password: ${{ secrets.ALIYUN_DOCKER_PASSWORD }}
- name: Ensure build script is executable
run: chmod +x ./hack/image-build-and-push.sh
- name: Convert service name to lowercase
run: echo "SERVICE=$(echo '${{ github.event.inputs.service }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_ENV
- name: Build and Push Docker Image
run: |
cd $GITHUB_WORKSPACE && bash ./hack/image-build-and-push.sh $SERVICE