-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from HXSecurity/develop
Develop
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: Release DongTai IAST Base Image | ||
|
||
on: | ||
push: | ||
branches: [ "release-*" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 4 | ||
|
||
steps: | ||
- name: start-build | ||
uses: joelwmale/webhook-action@master | ||
with: | ||
url: ${{ secrets.WEBHOOK_URL }} | ||
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"}}]}}' | ||
|
||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v1 | ||
|
||
- name: Login to DockerHub | ||
uses: docker/login-action@v1 | ||
with: | ||
registry: ${{ secrets.ALIYUN_REGISTRY }} | ||
username: ${{ secrets.ALIYUN_DOCKERHUB_USER }} | ||
password: ${{ secrets.ALIYUN_DOCKERHUB_PASSWORD }} | ||
|
||
- id: release | ||
run: | | ||
VERSION=`echo ${GITHUB_REF##*/} | awk -F'-' '{print $2}'` | ||
echo "::set-output name=version::$VERSION" | ||
- name: Build and push MySql | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./mysql | ||
push: true | ||
tags: "registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-mysql:${{ steps.release.outputs.version }}," | ||
|
||
- name: Build and push Redis | ||
uses: docker/build-push-action@v2 | ||
with: | ||
context: ./redis | ||
push: true | ||
tags: "registry.cn-beijing.aliyuncs.com/huoxian_pub/dongtai-redis:${{ steps.release.outputs.version }}," | ||
|
||
- name: finish build | ||
uses: joelwmale/webhook-action@master | ||
with: | ||
url: ${{ secrets.WEBHOOK_URL }} | ||
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"}}]}}' | ||
|