Merge pull request #487 from gravitl/lmnzx-patch-branchtest #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build test application | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- 'master' | |
jobs: | |
update-action: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
repository: gravitl/devops | |
ref: master | |
- name: Setup Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version-file: go.mod | |
- name: build test app | |
run: | | |
cd test | |
CGO_ENABLED=0 go build -ldflags="-s -w" -mod=mod -o ./test | |
- name: deploy | |
uses: mdallasanta/ssh-scp-deploy@v1.1.0 | |
with: | |
local: ./test/test # Local file path - REQUIRED false - DEFAULT ./ | |
remote: /var/www/files/testing/ # Remote file path - REQUIRED false - DEFAULT ~/ | |
host: fileserver.clustercat.com # Remote server address - REQUIRED true | |
user: root # Remote server user - REQUIRED true | |
key: ${{secrets.TESTING_SSH_KEY}} # Remote server private key - REQUIRED at least one of "password" or "key" |