■ ■ ■ ■ ■ ■
.github/workflows/package.yaml
1 | | - | name: Package |
2 | | - | on: |
3 | | - | push: |
4 | | - | tags: |
5 | | - | - "*" |
6 | | - | |
7 | | - | jobs: |
8 | | - | package-docker: |
9 | | - | name: package-docker |
10 | | - | runs-on: ubuntu-20.04 |
11 | | - | if: startsWith(github.ref, 'refs/tags/') |
12 | | - | strategy: |
13 | | - | matrix: |
14 | | - | include: |
15 | | - | - registry: docker.io |
16 | | - | repo: dvkunion/seamoon |
17 | | - | username: ${{ secrets.DOCKERHUB_USERNAME }} |
18 | | - | password: ${{ secrets.DOCKERHUB_TOKEN }} |
19 | | - | - registry: [ |
20 | | - | registry.cn-hangzhou.aliyuncs.com, |
21 | | - | registry.cn-shanghai.aliyuncs.com, |
22 | | - | registry.cn-qingdao.aliyuncs.com, |
23 | | - | registry.cn-beijing.aliyuncs.com, |
24 | | - | registry.cn-zhangjiakou.aliyuncs.com, |
25 | | - | registry.cn-huhehaote.aliyuncs.com, |
26 | | - | registry.cn-shenzhen.aliyuncs.com, |
27 | | - | registry.cn-chengdu.aliyuncs.com, |
28 | | - | registry.cn-hongkong.aliyuncs.com, |
29 | | - | registry.ap-northeast-1.aliyuncs.com, |
30 | | - | registry.ap-southeast-1.aliyuncs.com, |
31 | | - | registry.ap-southeast-2.aliyuncs.com/seammon/seamoon", |
32 | | - | registry.ap-southeast-3.aliyuncs.com, |
33 | | - | registry.ap-southeast-5.aliyuncs.com, |
34 | | - | registry.ap-south-1.aliyuncs.com, |
35 | | - | registry.eu-central-1.aliyuncs.com, |
36 | | - | registry.eu-west-1.aliyuncs.com, |
37 | | - | registry.us-west-1.aliyuncs.com, |
38 | | - | registry.us-east-1.aliyuncs.com, |
39 | | - | ] |
40 | | - | repo: seamoon/seamoon |
41 | | - | username: ${{ secrets.ALIYUN_USERNAME }} |
42 | | - | password: ${{ secrets.ALIYUN_PASSWORD }} |
43 | | - | - registry: [ |
44 | | - | hkccr.ccs.tencentyun.com, |
45 | | - | inccr.ccs.tencentyun.com, |
46 | | - | sgccr.ccs.tencentyun.com, |
47 | | - | thccr.ccs.tencentyun.com, |
48 | | - | krccr.ccs.tencentyun.com, |
49 | | - | jpccr.ccs.tencentyun.com, |
50 | | - | deccr.ccs.tencentyun.com, |
51 | | - | useccr.ccs.tencentyun.com, |
52 | | - | uswccr.ccs.tencentyun.com, |
53 | | - | ] |
54 | | - | repo: seamoon/seamoon |
55 | | - | username: ${{ secrets.TENCENT_USERNAME }} |
56 | | - | password: ${{ secrets.TENCENT_PASSWORD }} |
57 | | - | - registry: [ |
58 | | - | ccr.ccs.tencentyun.com, |
59 | | - | ] |
60 | | - | repo: dvkunion/seamoon |
61 | | - | username: ${{ secrets.TENCENT_USERNAME }} |
62 | | - | password: ${{ secrets.TENCENT_PASSWORD }} |
63 | | - | steps: |
64 | | - | - uses: actions/checkout@v4 |
65 | | - | - uses: docker/setup-qemu-action@v3 |
66 | | - | - uses: docker/setup-buildx-action@v3 |
67 | | - | - uses: docker/login-action@v3 |
68 | | - | name: login ${{ matrix.registry }} |
69 | | - | with: |
70 | | - | registry: ${{ matrix.registry }} |
71 | | - | username: ${{ matrix.username }} |
72 | | - | password: ${{ matrix.password }} |
73 | | - | - uses: docker/build-push-action@v5 |
74 | | - | with: |
75 | | - | push: true |
76 | | - | platforms: | |
77 | | - | linux/amd64 |
78 | | - | linux/arm64 |
79 | | - | linux/386 |
80 | | - | tags: | |
81 | | - | ${{ matrix.registry }}/${{ matrix.repo }}:latest |
82 | | - | ${{ matrix.registry }}/${{ matrix.repo }}:${{github.ref_name}} |
83 | | - | build-args: | |
84 | | - | VERSION=${{github.ref_name}} |
85 | | - | context: ./ |