name: govulncheck
on:
  schedule:
  - cron: 22 2 * * *
jobs:
  govulncheck:
    runs-on: ubuntu-22.04
    steps:
    - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
    - name: go-version
      id: go-version
      run: |
        echo go-version="$(awk '/GO_VERSION:/ { print $2 }' .github/workflows/main.yml)" >> ${GITHUB_OUTPUT}
    - uses: actions/setup-go@c4a742cab115ed795e34d4513e2cf7d472deb55f
      with:
        cache: true
        go-version: ${{ steps.go-version.outputs.go-version }}
    - name: install
      run: |
        go install golang.org/x/vuln/cmd/govulncheck@latest
    - name: run
      run: |
        govulncheck ./...
