Skip to content

Commit

Permalink
feat(ci): replace GHCR to Aliyun registry
Browse files Browse the repository at this point in the history
  • Loading branch information
mikucat0309 committed Feb 7, 2024
1 parent 00983fe commit cc12dd3
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
name: Release build

on:
release:
types:
- published
push:
tags:
- v**
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
environment: release
permissions:
contents: read
packages: write
Expand All @@ -17,7 +19,7 @@ jobs:
uses: docker/metadata-action@v5
with:
images: |
ghcr.io/qingdaou/oj-judge
registry.cn-hangzhou.aliyuncs.com/oj-image/judge
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
Expand All @@ -36,6 +38,13 @@ jobs:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Login to Aliyun Container Registry
uses: docker/login-action@v3
with:
registry: registry.cn-hangzhou.aliyuncs.com
username: ${{ secrets.ALIYUN_ACR_USERNAME }}
password: ${{ secrets.ALIYUN_ACR_PASSWORD }}

- name: Build and push
uses: docker/build-push-action@v5
with:
Expand Down

0 comments on commit cc12dd3

Please sign in to comment.