Skip to content

Commit

Permalink
Update docker-buildx.yml (#263)
Browse files Browse the repository at this point in the history
  • Loading branch information
cubxxw authored Nov 10, 2023
1 parent 704d036 commit f578e83
Showing 1 changed file with 46 additions and 10 deletions.
56 changes: 46 additions & 10 deletions .github/workflows/docker-buildx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ name: Docker Buildx Images CI

on:
schedule:
- cron: '0 23 * * *'
- cron: '30 1 * * *'
push:
branches:
- release-*
Expand All @@ -29,26 +29,51 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up QEMU
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
install: true

- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: ${{ runner.os }}-buildx-

- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Log in to AliYun Docker Hub
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIREGISTRY_USERNAME }}
password: ${{ secrets.ALIREGISTRY_TOKEN }}

- name: Extract metadata (tags, labels) for Docker chat-api-admin
id: meta1
uses: docker/[email protected]
with:
images: ghcr.io/openimsdk/chat-api-admin
images: |
ghcr.io/openimsdk/chat-api-admin
openim/chat-api-admin
registry.cn-hangzhou.aliyuncs.com/openimsdk/chat-api-admin
- name: Build and push Docker image for chat-api-admin
uses: docker/build-push-action@v4
Expand All @@ -64,7 +89,10 @@ jobs:
id: meta2
uses: docker/[email protected]
with:
images: ghcr.io/openimsdk/chat-api-chat
images: |
ghcr.io/openimsdk/chat-api-chat
openim/chat-api-chat
registry.cn-hangzhou.aliyuncs.com/openimsdk/chat-api-chat
- name: Build and push Docker image for chat-api-chat
uses: docker/build-push-action@v4
Expand All @@ -80,7 +108,10 @@ jobs:
id: meta3
uses: docker/[email protected]
with:
images: ghcr.io/openimsdk/chat-rpc-admin
images: |
ghcr.io/openimsdk/chat-rpc-admin
openim/chat-rpc-admin
registry.cn-hangzhou.aliyuncs.com/openimsdk/chat-rpc-admin
- name: Build and push Docker image for chat-rpc-admin
uses: docker/build-push-action@v4
Expand All @@ -96,7 +127,10 @@ jobs:
id: meta4
uses: docker/[email protected]
with:
images: ghcr.io/openimsdk/chat-rpc-chat
images: |
ghcr.io/openimsdk/chat-rpc-chat
openim/chat-rpc-chat
registry.cn-hangzhou.aliyuncs.com/openimsdk/chat-rpc-chat
- name: Build and push Docker image for chat-rpc-chat
uses: docker/build-push-action@v4
Expand All @@ -106,4 +140,6 @@ jobs:
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta4.outputs.tags }}
labels: ${{ steps.meta4.outputs.labels }}
labels: ${{ steps.meta4.outputs.labels }}


0 comments on commit f578e83

Please sign in to comment.