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 }}."