■ ■ ■ ■ ■ ■ ■
.github/workflows/package.yaml
| skipped 8 lines |
9 | 9 | | name: package-docker |
10 | 10 | | runs-on: ubuntu-20.04 |
11 | 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 }} |
12 | 63 | | steps: |
13 | 64 | | - uses: actions/checkout@v4 |
14 | 65 | | - uses: docker/setup-qemu-action@v3 |
15 | 66 | | - uses: docker/setup-buildx-action@v3 |
16 | 67 | | - uses: docker/login-action@v3 |
| 68 | + | name: login ${{ matrix.registry }} |
17 | 69 | | with: |
18 | | - | username: ${{ secrets.DOCKERHUB_USERNAME }} |
19 | | - | password: ${{ secrets.DOCKERHUB_TOKEN }} |
| 70 | + | registry: ${{ matrix.registry }} |
| 71 | + | username: ${{ matrix.username }} |
| 72 | + | password: ${{ matrix.password }} |
20 | 73 | | - uses: docker/build-push-action@v5 |
21 | 74 | | with: |
22 | 75 | | push: true |
| skipped 2 lines |
25 | 78 | | linux/arm64 |
26 | 79 | | linux/386 |
27 | 80 | | tags: | |
28 | | - | dvkunion/seamoon:latest |
29 | | - | dvkunion/seamoon:${{github.ref_name}} |
| 81 | + | ${{ matrix.registry }}/${{ matrix.repo }}:latest |
| 82 | + | ${{ matrix.registry }}/${{ matrix.repo }}:${{github.ref_name}} |
30 | 83 | | build-args: | |
31 | 84 | | VERSION=${{github.ref_name}} |
32 | 85 | | context: ./ |