mirror of
https://github.com/KaySar12/NextZen-UserService.git
synced 2025-10-06 19:59:42 +07:00
Update push_test_server.yml
Signed-off-by: raller1028 <57336867+raller1028@users.noreply.github.com>
This commit is contained in:
@@ -21,38 +21,44 @@ jobs:
|
|||||||
-
|
-
|
||||||
name: Fetch all tags
|
name: Fetch all tags
|
||||||
run: sudo git fetch --force --tags
|
run: sudo git fetch --force --tags
|
||||||
- name: Get version
|
|
||||||
id: get_version
|
- name: set version
|
||||||
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
run: sudo git tag v99.99.99-alpha
|
||||||
run: echo "VERSION=$(git describe --abbrev=0 --tags | awk -F- '{print $1}')" >> $GITHUB_ENV
|
|
||||||
- name: show version
|
- name: Set up Go
|
||||||
id: show_version
|
|
||||||
# run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
|
|
||||||
run: echo ${{env.VERSION}}
|
|
||||||
-
|
|
||||||
name: Set up Go
|
|
||||||
uses: actions/setup-go@v2
|
uses: actions/setup-go@v2
|
||||||
with:
|
with:
|
||||||
go-version: 1.19
|
go-version: 1.19
|
||||||
-
|
|
||||||
name: Run GoReleaser
|
- name: Run GoReleaser
|
||||||
uses: goreleaser/goreleaser-action@v2
|
uses: goreleaser/goreleaser-action@v2
|
||||||
with:
|
with:
|
||||||
# either 'goreleaser' (default) or 'goreleaser-pro'
|
# either 'goreleaser' (default) or 'goreleaser-pro'
|
||||||
distribution: goreleaser
|
distribution: goreleaser
|
||||||
version: latest
|
version: latest
|
||||||
args: release --rm-dist
|
args: release --rm-dist --snapshot
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
# Your GoReleaser Pro key, if you are using the 'goreleaser-pro' distribution
|
||||||
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
# GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
|
||||||
|
|
||||||
|
- name: remove migration file
|
||||||
|
run: find . -type f \( -name '*migration*' \) -delete
|
||||||
|
|
||||||
- name: install sshpass
|
- name: install sshpass
|
||||||
run: sudo apt install sshpass --yes
|
run: sudo apt install sshpass --yes
|
||||||
|
|
||||||
|
- name: ZeroTier
|
||||||
|
uses: zerotier/github-action@v1.0.1
|
||||||
|
with:
|
||||||
|
network_id: ${{ secrets.ZEROTIER_NETWORK_ID }}
|
||||||
|
auth_token: ${{ secrets.ZEROTIER_CENTRAL_TOKEN }}
|
||||||
|
|
||||||
- name: copy tar to target host
|
- name: copy tar to target host
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sshpass -p "${{ secrets.ssh_password }}" scp -r -o StrictHostKeyChecking=no -P ${{ secrets.ssh_port }} ./dist/*.gz root@${{ secrets.ssh_ip }}:/var/www/download
|
sshpass -p "${{ secrets.ssh_password }}" scp -r -o StrictHostKeyChecking=no -P 22 ./dist/*.gz root@10.147.18.11:/var/www/download
|
||||||
echo "ping success"
|
echo "ping success"
|
||||||
- name: send message
|
- name: send message
|
||||||
run: |
|
run: |
|
||||||
curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"text","content":{"text":"CasaOS-User updated"}}' https://open.feishu.cn/open-apis/bot/v2/hook/eb8f45c7-9636-4b64-84f2-a66d9aeb9d30
|
curl -X POST -H "Content-Type: application/json" -d '{"msg_type":"text","content":{"text":"CasaOS-User updated"}}' ${{ secrets.SSH_ROBOT_URL }}
|
||||||
|
|||||||
Reference in New Issue
Block a user