From f37ade4481ba66bbe06474b7bf1ac8020f698d47 Mon Sep 17 00:00:00 2001 From: Sam <109683132+kernelsam@users.noreply.github.com> Date: Wed, 14 Feb 2024 14:12:22 -0800 Subject: [PATCH] senzing-factory/build-resources#69 add linting --- .github/workflows/add-labels-standardized.yaml | 2 +- .../workflows/add-to-project-garage-dependabot.yaml | 5 ++--- .github/workflows/add-to-project-garage.yaml | 9 +++++---- .github/workflows/dependabot-approve-and-merge.yaml | 2 +- .github/workflows/docker-build-container.yaml | 5 +++-- .../docker-push-containers-to-dockerhub.yaml | 5 +++-- .github/workflows/go-proxy-pull.yaml | 5 +++-- .github/workflows/go-test-darwin.yaml | 11 ++++++----- .github/workflows/go-test-linux.yaml | 11 ++++++----- .github/workflows/go-test-windows.yaml | 11 ++++++----- .github/workflows/gofmt.yaml | 2 +- .github/workflows/gosec.yaml | 7 ++++--- .github/workflows/lint-workflows.yaml | 3 ++- .github/workflows/make-go-github-file.yaml | 4 ++-- .github/workflows/make-go-tag.yaml | 9 +++++---- 15 files changed, 50 insertions(+), 41 deletions(-) diff --git a/.github/workflows/add-labels-standardized.yaml b/.github/workflows/add-labels-standardized.yaml index c20a712..1360a67 100644 --- a/.github/workflows/add-labels-standardized.yaml +++ b/.github/workflows/add-labels-standardized.yaml @@ -1,4 +1,4 @@ -name: 'add labels standardized' +name: add labels standardized on: issues: diff --git a/.github/workflows/add-to-project-garage-dependabot.yaml b/.github/workflows/add-to-project-garage-dependabot.yaml index d7adc03..1608560 100644 --- a/.github/workflows/add-to-project-garage-dependabot.yaml +++ b/.github/workflows/add-to-project-garage-dependabot.yaml @@ -1,14 +1,13 @@ -name: 'add to project garage dependabot' +name: add to project garage dependabot on: pull_request: branches: [main] jobs: - add-to-project-dependabot: secrets: SENZING_GITHUB_PROJECT_RW_TOKEN: ${{ secrets.SENZING_GITHUB_PROJECT_RW_TOKEN }} - uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@main + uses: senzing-factory/build-resources/.github/workflows/add-to-project-dependabot.yaml@v1 with: project: ${{ vars.SENZING_PROJECT_GARAGE }} diff --git a/.github/workflows/add-to-project-garage.yaml b/.github/workflows/add-to-project-garage.yaml index ddebc40..c504727 100644 --- a/.github/workflows/add-to-project-garage.yaml +++ b/.github/workflows/add-to-project-garage.yaml @@ -1,4 +1,4 @@ -name: 'add to project garage' +name: add to project garage on: issues: @@ -8,11 +8,12 @@ on: jobs: add-to-project: - name: Add issue to project + name: add issue to project runs-on: ubuntu-latest + steps: - - name: Assign issue to project + - name: assign issue to project uses: actions/add-to-project@v0.5.0 with: - project-url: https://github.com/orgs/${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}/projects/${{ vars.SENZING_PROJECT_GARAGE }} github-token: ${{ secrets.SENZING_GITHUB_ACCESS_TOKEN }} + project-url: https://github.com/orgs/${{ vars.SENZING_GITHUB_ACCOUNT_NAME }}/projects/${{ vars.SENZING_PROJECT_GARAGE }} diff --git a/.github/workflows/dependabot-approve-and-merge.yaml b/.github/workflows/dependabot-approve-and-merge.yaml index c357735..15a5bf9 100644 --- a/.github/workflows/dependabot-approve-and-merge.yaml +++ b/.github/workflows/dependabot-approve-and-merge.yaml @@ -1,4 +1,4 @@ -name: 'dependabot approve and merge' +name: dependabot approve and merge on: pull_request: diff --git a/.github/workflows/docker-build-container.yaml b/.github/workflows/docker-build-container.yaml index 0fb2ed2..2a6d731 100644 --- a/.github/workflows/docker-build-container.yaml +++ b/.github/workflows/docker-build-container.yaml @@ -1,4 +1,4 @@ -name: 'docker build container' +name: docker build container on: pull_request: @@ -9,8 +9,9 @@ on: jobs: docker-build-container: runs-on: ubuntu-latest + steps: - - name: Build docker image + - name: build docker image uses: senzing-factory/github-action-docker-buildx-build@v1 with: image-repository: senzing/test-ground diff --git a/.github/workflows/docker-push-containers-to-dockerhub.yaml b/.github/workflows/docker-push-containers-to-dockerhub.yaml index df7cffc..a42b076 100644 --- a/.github/workflows/docker-push-containers-to-dockerhub.yaml +++ b/.github/workflows/docker-push-containers-to-dockerhub.yaml @@ -1,4 +1,4 @@ -name: 'docker push containers to dockerhub' +name: docker push containers to dockerhub on: push: @@ -8,8 +8,9 @@ on: jobs: docker-push-containers-to-dockerhub: runs-on: ubuntu-latest + steps: - - name: Build docker image and push to DockerHub + - name: build docker image and push to DockerHub uses: senzing-factory/github-action-docker-buildx-build@v1 with: build-options: "--push" diff --git a/.github/workflows/go-proxy-pull.yaml b/.github/workflows/go-proxy-pull.yaml index 7208754..ae93e40 100644 --- a/.github/workflows/go-proxy-pull.yaml +++ b/.github/workflows/go-proxy-pull.yaml @@ -1,4 +1,4 @@ -name: 'go proxy pull' +name: go proxy pull on: push: @@ -11,8 +11,9 @@ permissions: jobs: go-proxy-pull: runs-on: ubuntu-latest + steps: - - name: Pull new module version + - name: pull new module version uses: andrewslotin/go-proxy-pull-action@v1.1.0 with: import_path: github.com/senzing-garage/template-go diff --git a/.github/workflows/go-test-darwin.yaml b/.github/workflows/go-test-darwin.yaml index 075f1d8..d0f4ef4 100644 --- a/.github/workflows/go-test-darwin.yaml +++ b/.github/workflows/go-test-darwin.yaml @@ -1,4 +1,4 @@ -name: 'go test darwin' +name: go test darwin on: [push] @@ -11,22 +11,23 @@ permissions: jobs: go-test-darwin: + name: "go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" runs-on: ${{ matrix.os }} strategy: matrix: go: ["1.21"] os: [macos-latest] - name: "go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" + steps: - - name: Checkout repository + - name: checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup go + - name: setup go uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} - - name: Run go test + - name: run go test run: go test -v -p 1 ./... diff --git a/.github/workflows/go-test-linux.yaml b/.github/workflows/go-test-linux.yaml index 56e27d2..7d702e8 100644 --- a/.github/workflows/go-test-linux.yaml +++ b/.github/workflows/go-test-linux.yaml @@ -1,4 +1,4 @@ -name: 'go test linux' +name: go test linux on: [push] @@ -7,22 +7,23 @@ permissions: jobs: go-test-linux: + name: "go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" runs-on: ${{ matrix.os }} strategy: matrix: go: ["1.21"] os: [ubuntu-latest] - name: "go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" + steps: - - name: Checkout repository + - name: checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup go + - name: setup go uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} - - name: Run go test + - name: run go test run: go test -v -p 1 ./... diff --git a/.github/workflows/go-test-windows.yaml b/.github/workflows/go-test-windows.yaml index 4952a51..593fdc1 100644 --- a/.github/workflows/go-test-windows.yaml +++ b/.github/workflows/go-test-windows.yaml @@ -1,4 +1,4 @@ -name: 'go test windows' +name: go test windows on: [push] @@ -7,22 +7,23 @@ permissions: jobs: go-test-windows: + name: "go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" runs-on: ${{ matrix.os }} strategy: matrix: go: ["1.21"] os: [windows-latest] - name: "go test with OS: ${{ matrix.os }}; Go: ${{ matrix.go }}" + steps: - - name: Checkout repository + - name: checkout repository uses: actions/checkout@v4 with: fetch-depth: 0 - - name: Setup go + - name: setup go uses: actions/setup-go@v5 with: go-version: ${{ matrix.go }} - - name: Run go test + - name: run go test run: go test -v -p 1 ./... diff --git a/.github/workflows/gofmt.yaml b/.github/workflows/gofmt.yaml index 6f08ffb..122d306 100644 --- a/.github/workflows/gofmt.yaml +++ b/.github/workflows/gofmt.yaml @@ -1,4 +1,4 @@ -name: 'gofmt' +name: gofmt on: pull_request: diff --git a/.github/workflows/gosec.yaml b/.github/workflows/gosec.yaml index 567a2c1..2a3b8b2 100644 --- a/.github/workflows/gosec.yaml +++ b/.github/workflows/gosec.yaml @@ -1,4 +1,4 @@ -name: 'gosec' +name: gosec on: push: @@ -16,11 +16,12 @@ jobs: runs-on: ubuntu-latest env: GO111MODULE: on + steps: - - name: Checkout Source + - name: checkout repository uses: actions/checkout@v4 - - name: Run Gosec Security Scanner + - name: run Gosec Security Scanner uses: securego/gosec@v2.19.0 with: args: ./... diff --git a/.github/workflows/lint-workflows.yaml b/.github/workflows/lint-workflows.yaml index 7c83187..1bcd936 100644 --- a/.github/workflows/lint-workflows.yaml +++ b/.github/workflows/lint-workflows.yaml @@ -1,4 +1,4 @@ -name: 'lint workflows' +name: lint workflows on: push: @@ -9,6 +9,7 @@ on: permissions: contents: read packages: read + pull-requests: read statuses: write jobs: diff --git a/.github/workflows/make-go-github-file.yaml b/.github/workflows/make-go-github-file.yaml index a4f506b..25e57ff 100644 --- a/.github/workflows/make-go-github-file.yaml +++ b/.github/workflows/make-go-github-file.yaml @@ -1,4 +1,4 @@ -name: 'make go github file' +name: make go github file on: push: @@ -11,8 +11,8 @@ permissions: jobs: make-go-github-file: - uses: senzing-factory/build-resources/.github/workflows/make-go-github-file.yaml@v1 secrets: SENZING_GITHUB_ACTOR: ${{ secrets.SENZING_GITHUB_ACTOR }} SENZING_GITHUB_GPG_PASSPHRASE: ${{ secrets.SENZING_GITHUB_GPG_PASSPHRASE }} SENZING_GITHUB_GPG_PRIVATE_KEY: ${{ secrets.SENZING_GITHUB_GPG_PRIVATE_KEY }} + uses: senzing-factory/build-resources/.github/workflows/make-go-github-file.yaml@v1 diff --git a/.github/workflows/make-go-tag.yaml b/.github/workflows/make-go-tag.yaml index f8603a4..5a25899 100644 --- a/.github/workflows/make-go-tag.yaml +++ b/.github/workflows/make-go-tag.yaml @@ -1,4 +1,4 @@ -name: 'make go tag' +name: make go tag on: push: @@ -10,11 +10,12 @@ permissions: jobs: make-go-tag: - name: Make a vM.m.P tag + name: make a vM.m.P tag runs-on: ubuntu-latest + steps: - - name: Checkout repository + - name: checkout repository uses: actions/checkout@v4 - - name: Make go version tag + - name: make go version tag uses: senzing-factory/github-action-make-go-tag@v1