diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index aea1975..0ba0bfa 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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 @@ -17,7 +19,7 @@ jobs: uses: docker/metadata-action@v5 with: images: | - ghcr.io/qingdaou/oj-judge + registry.cn-hongkong.aliyuncs.com/oj-image/judge tags: | type=semver,pattern={{version}} type=semver,pattern={{major}}.{{minor}} @@ -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-hongkong.aliyuncs.com + username: ${{ secrets.ALIYUN_ACR_USERNAME }} + password: ${{ secrets.ALIYUN_ACR_PASSWORD }} + - name: Build and push uses: docker/build-push-action@v5 with: