Skip to content

Commit

Permalink
fix: sync image to aliyuns repo
Browse files Browse the repository at this point in the history
  • Loading branch information
redscholar authored Sep 9, 2024
1 parent d7ed68c commit 65fdc95
Showing 1 changed file with 21 additions and 10 deletions.
31 changes: 21 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,27 @@ on:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
name: Build Release

env:
# TODO: Change variable to your image's name.
IMAGE_NAME: ks-console
IMAGE_REPO: kubesphere

jobs:
release-linux-amd64:
runs-on: ubuntu-latest
if: github.repository == 'kubesphere/console'
steps:
- uses: actions/checkout@v2

- name: Login to Aliyun
uses: docker/login-action@v3
with:
registry: registry.cn-beijing.aliyuncs.com
username: ${{ secrets.ALIYUNCS_USERNAME }}
password: ${{ secrets.ALIYUNCS_PASSWORD }}

- name: Login to DOCKER
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}


- name: Set up QEMU
uses: docker/setup-qemu-action@v1
with:
Expand All @@ -25,10 +34,12 @@ jobs:
- name: Set up Docker buildx
uses: docker/setup-buildx-action@v1

- name: Log into registry
run: echo "${{ secrets.DOCKERHUB_PASSWORD }}" | docker login -u ${{ secrets.DOCKERHUB_USERNAME }} --password-stdin

- name: Push image
run: |
TAG=${GITHUB_REF#refs/*/} REPO=$IMAGE_REPO make container-cross-push
echo "Push $IMAGE success!"
tag=${GITHUB_REF#refs/*/}
if [[ $tag =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
REPO=docker.io/kubesphere TAG=$tag make container-cross-push
REPO=registry.cn-beijing.aliyuncs.com/kubesphereio TAG=$tag make container-cross-push
else
REPO=docker.io/kubespheredev TAG=$tag make container-cross-push
fi

0 comments on commit 65fdc95

Please sign in to comment.