chore: start up #8
Workflow file for this run
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
name: GoReleaser | |
on: | |
push: | |
tags: | |
- "v*" | |
jobs: | |
server: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v1 | |
- name: Set up Docker Buildx | |
id: buildx | |
uses: docker/setup-buildx-action@v1 | |
- name: Login to Dockerhub | |
uses: docker/login-action@v1 | |
with: | |
registry: docker.io | |
username: ${{ secrets.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKER_PASSWORD }} | |
- name: 打包镜像并推送 | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: ./Dockerfile | |
platforms: linux/amd64 | |
push: true | |
tags: | | |
"docker.io/mereith/van-hub:latest" | |
- name: 部署到集群 | |
uses: steebchen/[email protected] | |
with: # defaults to latest kubectl binary version | |
config: ${{ secrets.K8S_CONFIG_DATA }} | |
command: rollout restart deployment/van-hub-demo -n tools | |
- name: 通知 | |
run: | | |
curl -X POST -H "Content-Type: application/json" -d '{"source":"github-ci:van-hub-demo","message":"流水线运行完毕。\n版本: ${{ github.ref_name }}" }' ${{ secrets.WEBHOOK_URL }} |