feat(cn): add json4u.cn sunset banner #77
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Aliyun Docker Image | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref_name }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set variables | |
| run: | | |
| VER=$(grep '"version"' package.json | cut -d '"' -f 4) | |
| echo "VERSION=$VER" >> $GITHUB_ENV | |
| - name: Login to ACR | |
| uses: aliyun/acr-login@v1 | |
| with: | |
| login-server: https://registry.cn-heyuan.aliyuncs.com | |
| username: "${{ secrets.ACR_REGISTRY_USERNAME }}" | |
| password: "${{ secrets.ACR_REGISTRY_PASSWORD }}" | |
| - name: Build and push image | |
| run: | | |
| IMAGE_NAME=registry.cn-heyuan.aliyuncs.com/json4u/json4u | |
| docker build . \ | |
| --build-arg APP_URL=${{ secrets.ALIYUN_APP_URL }} \ | |
| --build-arg FREE_QUOTA=${{ secrets.ALIYUN_FREE_QUOTA }} \ | |
| --build-arg SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }} \ | |
| --tag $IMAGE_NAME:${{ env.VERSION }} | |
| docker tag $IMAGE_NAME:${{ env.VERSION }} $IMAGE_NAME:latest | |
| docker push $IMAGE_NAME:latest |