build: add gitea runner
This commit is contained in:
parent
8611a8b467
commit
ad53d03a82
|
@ -36,6 +36,7 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
|
@ -45,19 +46,24 @@ jobs:
|
||||||
run: go build -ldflags "-s -w" -o build/ev ./cmd/ev
|
run: go build -ldflags "-s -w" -o build/ev ./cmd/ev
|
||||||
|
|
||||||
- name: Compress
|
- name: Compress
|
||||||
uses: gruebel/upx:latest
|
uses: actions/ghaction-upx@v3
|
||||||
run: upx --best --lzma -o .ansible/ev build/ev
|
with:
|
||||||
|
version: latest
|
||||||
|
files: |
|
||||||
|
./cmd/ev
|
||||||
|
args: -fq
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: plugins/ansible:3
|
uses: actions/action-ansible-playbook@v2
|
||||||
run: upx --best --lzma -o .ansible/ev build/ev
|
|
||||||
with:
|
with:
|
||||||
playbook: .ansible/playbook.yml
|
playbook: .ansible/playbook.yml
|
||||||
inventory: .ansible/inventory
|
key: ${{secrets.deploy_ssh}}
|
||||||
become: true
|
options: |
|
||||||
become_method: sudo
|
--inventory .hosts
|
||||||
ssh_common_args: -p 65535
|
--become
|
||||||
user: deploy
|
--become-method sudo
|
||||||
private_key: deploy_ssh
|
--user deploy
|
||||||
|
--ssh-common-args '-p 65535'
|
||||||
|
|
||||||
|
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
- run: echo "🍏 This job's status is ${{ job.status }}."
|
||||||
|
|
Loading…
Reference in New Issue
Block a user