vendor plugin sdk #168
Workflow file for this run
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
on: pull_request | |
name: Check Commit | |
env: | |
GOPRIVATE: github.com/OpsHelmInc/* | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
jobs: | |
check_commit: | |
name: Check Commit | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: '^1.20.0' | |
- name: Get Go cache paths | |
id: cache-path | |
run: | | |
echo "build=$(go env GOCACHE)" >>"$GITHUB_OUTPUT" | |
echo "module=$(go env GOMODCACHE)" >>"$GITHUB_OUTPUT" | |
shell: bash | |
- name: Setup Cache | |
uses: actions/cache@v4 | |
with: | |
path: | | |
${{ steps.cache-path.outputs.build }} | |
${{ steps.cache-path.outputs.module }} | |
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }} | |
restore-keys: | | |
${{ runner.os }}-golang- | |
- name: Setup SSH Keys and known_hosts | |
run: | | |
ssh-agent -a $SSH_AUTH_SOCK | |
echo '${{ secrets.OH_DEPLOY_KEY }}' | base64 --decode > deploy-key | |
chmod 600 deploy-key | |
ssh-add deploy-key | |
ssh-add -l | |
git config --global url."ssh://[email protected]/OpsHelmInc".insteadOf "https://github.com/OpsHelmInc" | |
env: | |
SSH_AUTH_SOCK: /tmp/ssh_agent.sock | |
- name: Install Tools | |
run: make install-tools | |
- name: Gen | |
run: make gen | |
- name: Fail if generation updated files | |
run: test "$(git status -s | wc -l)" -eq 0 || (git status -s; exit 1) | |
- name: Check | |
run: make test | |
- name: golangci-lint | |
uses: golangci/golangci-lint-action@v6 | |
with: | |
version: v1.61.0 | |
args: --timeout=5m |