build: add gitea runner
Some checks failed
Go Test / test (push) Successful in 54s
Go Test / deploy (push) Failing after 2s

This commit is contained in:
xuu 2023-09-29 13:13:09 -06:00
parent 8611a8b467
commit ad53d03a82

View File

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