|
1 | | -name: Release DongTai IAST Base Image |
| 1 | +name: Manual DongTai IAST Base Image |
2 | 2 |
|
3 | 3 | on: |
4 | 4 | workflow_dispatch: # ✅ 改为手动触发 |
|
9 | 9 | default: 'v1.17.7' |
10 | 10 |
|
11 | 11 | jobs: |
| 12 | + Release-DongTai-Infra-Service: |
| 13 | + runs-on: ubuntu-latest |
| 14 | + strategy: |
| 15 | + max-parallel: 4 |
| 16 | + steps: |
| 17 | + - name: start-build |
| 18 | + uses: joelwmale/webhook-action@master |
| 19 | + with: |
| 20 | + url: ${{ secrets.WEBHOOK_URL }} |
| 21 | + body: '{"msg_type": "interactive","card": {"config": {"wide_screen_mode": true,"enable_forward": true},"elements": [{"tag": "div","text": {"content": "状态:构建开始\n项目:${{github.repository}}\n分支:${{github.ref}}\n流程:${{github.workflow}}\n构建编号:${{github.run_number}}\n触发事件:${{github.event_name}}\n提交人:${{github.actor}}\n","tag": "lark_md"}}]}}' |
| 22 | + |
| 23 | + - name: Checkout |
| 24 | + uses: actions/checkout@v3 |
| 25 | + - name: Set up Docker Buildx |
| 26 | + uses: docker/setup-buildx-action@v2 |
| 27 | + |
| 28 | + - name: Login to DockerHub |
| 29 | + uses: docker/login-action@v1 |
| 30 | + with: |
| 31 | + username: ${{ secrets.DONGTAI_DOCKERHUB_USERNAME }} |
| 32 | + password: ${{ secrets.DONGTAI_DOCKERHUB_TOKEN }} |
| 33 | + |
| 34 | + - name: Login to AliyunRegistry |
| 35 | + uses: docker/login-action@v1 |
| 36 | + with: |
| 37 | + registry: ${{ secrets.ALIYUN_REGISTRY }} |
| 38 | + username: ${{ secrets.ALIYUN_DOCKERHUB_USER }} |
| 39 | + password: ${{ secrets.ALIYUN_DOCKERHUB_PASSWORD }} |
| 40 | + |
| 41 | + - id: release |
| 42 | + run: | |
| 43 | + TAG_NAME=${{ github.event.inputs.version }} # ✅ 使用手动输入的版本号 |
| 44 | + ID=`echo ${TAG_NAME##v}` |
| 45 | + echo "::set-output name=version::$ID" |
| 46 | +
|
| 47 | + - name: Build and push logstash |
| 48 | + uses: docker/build-push-action@v3 |
| 49 | + with: |
| 50 | + context: ./logstash |
| 51 | + file: ./logstash/Dockerfile |
| 52 | + push: true |
| 53 | + platforms: linux/amd64 |
| 54 | + tags: | |
| 55 | + dongtai/dongtai-logstash:${{ steps.release.outputs.version }} |
| 56 | + dongtai/dongtai-logstash:latest |
| 57 | +
|
| 58 | + - name: Build and push logrotate |
| 59 | + uses: docker/build-push-action@v3 |
| 60 | + with: |
| 61 | + context: ./logrotate |
| 62 | + file: ./logrotate/Dockerfile |
| 63 | + push: true |
| 64 | + platforms: linux/amd64 |
| 65 | + tags: | |
| 66 | + dongtai/dongtai-logrotate:${{ steps.release.outputs.version }} |
| 67 | + dongtai/dongtai-logrotate:latest |
| 68 | +
|
| 69 | + - name: Build and push Redis |
| 70 | + uses: docker/build-push-action@v2 |
| 71 | + with: |
| 72 | + context: ./redis |
| 73 | + push: true |
| 74 | + platforms: linux/amd64 |
| 75 | + tags: | |
| 76 | + dongtai/dongtai-redis:${{ steps.release.outputs.version }} |
| 77 | + dongtai/dongtai-redis:latest |
| 78 | +
|
| 79 | + - name: finish build |
| 80 | + uses: joelwmale/webhook-action@master |
| 81 | + with: |
| 82 | + url: ${{ secrets.WEBHOOK_URL }} |
| 83 | + body: '{"msg_type": "interactive","card": {"config": {"wide_screen_mode": true,"enable_forward": true},"elements": [{"tag": "div","text": {"content": "状态:构建完成\n项目:${{github.repository}}\n分支:${{github.ref}}\n流程:${{github.workflow}}\n构建编号:${{github.run_number}}\n触发事件:${{github.event_name}}\n提交人:${{github.actor}}\nSHA-1:${{github.sha}}\n","tag": "lark_md"}}]}}' |
| 84 | + |
12 | 85 | dongtai-mysql: |
13 | 86 | name: dongtai-mysql |
14 | 87 | runs-on: ubuntu-latest |
|
0 commit comments