From fc9451ea92b4800164a22c0b5691a8a1f1dd7ace Mon Sep 17 00:00:00 2001 From: catatsuy Date: Sun, 18 Feb 2024 13:55:42 +0900 Subject: [PATCH] Update workflows with proper indentation and formatting --- .github/workflows/codeql.yml | 63 +++++++++++++++++----------------- .github/workflows/go.yml | 28 +++++++-------- .github/workflows/release.yml | 2 +- .github/workflows/review.yml | 2 +- .github/workflows/security.yml | 6 ++-- 5 files changed, 49 insertions(+), 52 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 609e6a5..08fcf12 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,12 +13,12 @@ name: "CodeQL" on: push: - branches: [ "master" ] + branches: ["master"] pull_request: # The branches below must be a subset of the branches above - branches: [ "master" ] + branches: ["master"] schedule: - - cron: '23 0 * * 6' + - cron: "23 0 * * 6" jobs: analyze: @@ -32,43 +32,42 @@ jobs: strategy: fail-fast: false matrix: - language: [ 'go' ] + language: ["go"] # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ] # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support steps: - - name: Checkout repository - uses: actions/checkout@v4 + - name: Checkout repository + uses: actions/checkout@v4 - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: ${{ matrix.language }} + # If you wish to specify custom queries, you can do so here or in a config file. + # By default, queries listed here will override any specified in a config file. + # Prefix the list here with "+" to use these queries and those in the config file. - # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality + # Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs + # queries: security-extended,security-and-quality + # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v3 - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v3 + # ℹī¸ Command-line programs to run using the OS shell. + # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun + # If the Autobuild fails above, remove it and uncomment the following three lines. + # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. + # - run: | + # echo "Run, Build Application using script" + # ./location_of_script_within_repo/buildscript.sh - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 - with: - category: "/language:${{matrix.language}}" + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v3 + with: + category: "/language:${{matrix.language}}" diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index c01fd92..469ede7 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -1,26 +1,24 @@ name: Go on: [push] jobs: - test: name: Build runs-on: ubuntu-latest strategy: matrix: - go: [ '1.21.x' ] + go: ["1.21.x"] steps: + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ matrix.go }} + id: go - - name: Set up Go - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go }} - id: go - - - name: Check out code into the Go module directory - uses: actions/checkout@v4 + - name: Check out code into the Go module directory + uses: actions/checkout@v4 - - name: test - run: | - make vet - make test - make bin/notify_slack + - name: test + run: | + make vet + make test + make bin/notify_slack diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2823a60..b681948 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: release on: push: tags: - - "v[0-9]+.[0-9]+.[0-9]+" + - "v[0-9]+.[0-9]+.[0-9]+" jobs: goreleaser: runs-on: ubuntu-latest diff --git a/.github/workflows/review.yml b/.github/workflows/review.yml index a7a7f67..305456f 100644 --- a/.github/workflows/review.yml +++ b/.github/workflows/review.yml @@ -9,7 +9,7 @@ jobs: - uses: reviewdog/action-staticcheck@v1 with: github_token: ${{ secrets.github_token }} - staticcheck_flags: 'all,-ST1000' + staticcheck_flags: "all,-ST1000" # Change reviewdog reporter if you need [github-pr-check,github-check,github-pr-review]. reporter: github-pr-review # Report all results. diff --git a/.github/workflows/security.yml b/.github/workflows/security.yml index 673bfe3..42d821c 100644 --- a/.github/workflows/security.yml +++ b/.github/workflows/security.yml @@ -6,7 +6,7 @@ on: - master pull_request: schedule: - - cron: '0 0 * * *' + - cron: "0 0 * * *" jobs: govulncheck_job: @@ -16,5 +16,5 @@ jobs: - id: govulncheck uses: golang/govulncheck-action@v1 with: - go-version-input: 1.22.0 - go-package: ./... + go-version-input: 1.22.0 + go-package: ./...