Skip to content

Update to latest ohaws #105

Update to latest ohaws

Update to latest ohaws #105

Workflow file for this run

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@v3
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@v3
with:
version: v1.51.2
args: --timeout=5m