feat:Migrate some database fields (#1541) #173
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: Mono Engine deploy | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '.devcontainer/**' | |
| - '.github/**' | |
| - 'alfs/**' | |
| - 'aries/**' | |
| - 'config/**' | |
| - 'docker/**' | |
| - 'docs/**' | |
| - 'extensions/**' | |
| - 'monobean/**' | |
| - 'moon/**' | |
| - 'orion/**' | |
| - 'orion-server/**' | |
| - 'scorpio/**' | |
| - 'scripts/**' | |
| - 'tests/**' | |
| - 'third-party/**' | |
| - 'toolchains/**' | |
| env: | |
| AWS_ECS_CLUSTER_NAME: ${{ secrets.AWS_ECS_CLUSTER_NAME }} | |
| AWS_ECS_MONO_SERVICE_NAME: ${{ secrets.AWS_ECS_MONO_SERVICE_NAME }} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy-mono: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| aws-region: us-east-1 | |
| - name: Login to Amazon ECR Public | |
| id: login-ecr-public | |
| uses: aws-actions/amazon-ecr-login@v2 | |
| with: | |
| registry-type: public | |
| - name: Build, tag, and push docker image to Amazon ECR Public | |
| env: | |
| REGISTRY: ${{ steps.login-ecr-public.outputs.registry }} | |
| REGISTRY_ALIAS: m8q5m4u3 | |
| REPOSITORY: mega | |
| IMAGE_TAG: mono-0.1.0-pre-release | |
| run: | | |
| docker buildx build -t $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG -f ./docker/mono-engine-dockerfile . | |
| docker push $REGISTRY/$REGISTRY_ALIAS/$REPOSITORY:$IMAGE_TAG | |
| - name: Force ECS redeploy | |
| run: | | |
| aws ecs update-service \ | |
| --cluster ${{ secrets.AWS_ECS_CLUSTER_NAME }} \ | |
| --service ${{ secrets.AWS_ECS_MONO_SERVICE_NAME }} \ | |
| --force-new-deployment | |
| env: | |
| AWS_REGION: ap-southeast-2 | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |