From ad53d03a821c907b0385f544b94764706373011e Mon Sep 17 00:00:00 2001 From: xuu Date: Fri, 29 Sep 2023 13:13:09 -0600 Subject: [PATCH] build: add gitea runner --- .gitea/workflows/build-test.yml | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build-test.yml b/.gitea/workflows/build-test.yml index 633133e..f4c97db 100644 --- a/.gitea/workflows/build-test.yml +++ b/.gitea/workflows/build-test.yml @@ -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 }}."