diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 9953bd3..55c10ee 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -30,44 +30,18 @@ jobs: actions: read contents: read security-events: write - strategy: fail-fast: false matrix: language: [ 'go' ] - # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] - # Learn more: - # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed - steps: - name: Checkout repository - uses: actions/checkout@v2 - - # Initializes the CodeQL tools for scanning. + uses: actions/checkout@v4 - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + 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. - # queries: ./path/to/local/query, your-org/your-repo/queries@main - - # Autobuild attempts to build any compiled languages (C/C++, C#, 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@v1 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 https://git.io/JvXDl - - # ✏ī¸ If the Autobuild fails above, remove it and uncomment the following three lines - # and modify them (or add more) to build your code if your project - # uses a compiled language - - #- run: | - # make bootstrap - # make release - + uses: github/codeql-action/autobuild@v3 - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/go-build.yml b/.github/workflows/go-build.yml deleted file mode 100644 index 69d2117..0000000 --- a/.github/workflows/go-build.yml +++ /dev/null @@ -1,20 +0,0 @@ -name: Go Build - -on: - push: - pull_request: - -jobs: - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.19 - - - name: go build - run: go build -v diff --git a/.github/workflows/gobuild.yml b/.github/workflows/gobuild.yml new file mode 100644 index 0000000..1cbf144 --- /dev/null +++ b/.github/workflows/gobuild.yml @@ -0,0 +1,19 @@ +name: gobuild +on: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '5 5 1 * *' +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: checkout + uses: actions/checkout@v4 + - name: setup go + uses: actions/setup-go@v5 + with: + go-version: 1.21 + - name: go build + run: go build -v diff --git a/.github/workflows/gofmt.yml b/.github/workflows/gofmt.yml index d96daed..cda14c3 100644 --- a/.github/workflows/gofmt.yml +++ b/.github/workflows/gofmt.yml @@ -2,23 +2,26 @@ name: gofmt on: push: pull_request: + workflow_dispatch: + schedule: + - cron: '1 1 1 * *' jobs: run_gofmt: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v4 - - name: set up go - uses: actions/setup-go@v4 - with: - go-version: 'stable' # echo "go version" in the log - - name: run gofmt - shell: sh - run: | - files_with_format_issues="$( find . -name '*.go' -print0 | xargs --null --no-run-if-empty gofmt -l )" - echo 'files_with_format_issues:' - echo "${files_with_format_issues}" - num_files_with_format_issues="$( echo "${files_with_format_issues}" | grep --text --count '^./' || : )" - echo 'num_files_with_format_issues:' - echo "${num_files_with_format_issues}" - exit ${num_files_with_format_issues} + - name: checkout + uses: actions/checkout@v4 + - name: set up go + uses: actions/setup-go@v4 + with: + go-version: 'stable' # echo "go version" in the log + - name: run gofmt + shell: sh + run: | + files_with_format_issues="$( find . -name '*.go' -print0 | xargs --null --no-run-if-empty gofmt -l )" + echo 'files_with_format_issues:' + echo "${files_with_format_issues}" + num_files_with_format_issues="$( echo "${files_with_format_issues}" | grep --text --count '^./' || : )" + echo 'num_files_with_format_issues:' + echo "${num_files_with_format_issues}" + exit ${num_files_with_format_issues} diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 49a3856..84b312e 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -1,12 +1,15 @@ name: markdownlint on: - push: - pull_request: + push: + pull_request: + workflow_dispatch: + schedule: + - cron: '2 2 1 * *' jobs: run_markdownlint: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v4 - - name: Run markdownlint - uses: actionshub/markdownlint@main + - name: checkout + uses: actions/checkout@v4 + - name: Run markdownlint + uses: actionshub/markdownlint@main diff --git a/.github/workflows/shellcheck.yml b/.github/workflows/shellcheck.yml index e1a15bc..e4f28aa 100644 --- a/.github/workflows/shellcheck.yml +++ b/.github/workflows/shellcheck.yml @@ -1,13 +1,17 @@ name: shellcheck on: push: + pull_request: + workflow_dispatch: + schedule: + - cron: '4 4 1 * *' jobs: run_shellcheck: runs-on: ubuntu-latest steps: - - name: checkout - uses: actions/checkout@v4 - - name: run shellcheck - uses: ludeeus/action-shellcheck@master - with: - severity: style + - name: checkout + uses: actions/checkout@v4 + - name: run shellcheck + uses: ludeeus/action-shellcheck@master + with: + severity: style diff --git a/CHANGELOG.md b/CHANGELOG.md index 29873bc..4ea550a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## 2.2.1 + +- updated Github workflows +- updated dependenies + ## 2.2.0 - updated Github workflows diff --git a/README.md b/README.md index de8d25c..280e028 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # scmdhttpd -[![Actions Status](https://github.com/andreasschulze/scmdhttpd/workflows/Go%20Build/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions?query=workflow%3AGo%20Build) +[![Actions Status](https://github.com/andreasschulze/scmdhttpd/workflows/gobuild/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions?query=workflow%3Agobuild) [![Actions Status](https://github.com/andreasschulze/scmdhttpd/workflows/CodeQL/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions?query=workflow%3ACodeQL) [![gofmt](https://github.com/andreasschulze/scmdhttpd/actions/workflows/gofmt.yml/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions/workflows/gofmt.yml) [![markdownlint](https://github.com/andreasschulze/scmdhttpd/actions/workflows/markdownlint.yml/badge.svg)](https://github.com/andreasschulze/scmdhttpd/actions/workflows/markdownlint.yml) diff --git a/go.mod b/go.mod index 9a534fb..8908ecf 100644 --- a/go.mod +++ b/go.mod @@ -1,10 +1,10 @@ module github.com/andreasschulze/scmdhttpd -go 1.22 +go 1.21 require golang.org/x/crypto v0.17.0 require ( golang.org/x/net v0.17.0 // indirect - golang.org/x/text v0.13.0 // indirect + golang.org/x/text v0.14.0 // indirect ) diff --git a/go.sum b/go.sum index 5c941e8..6f80d7a 100644 --- a/go.sum +++ b/go.sum @@ -1,6 +1,6 @@ -golang.org/x/crypto v0.14.0 h1:wBqGXzWJW6m1XrIKlAH0Hs1JJ7+9KBwnIO8v66Q9cHc= -golang.org/x/crypto v0.14.0/go.mod h1:MVFd36DqK4CsrnJYDkBA3VC4m2GkXAM0PvzMCn4JQf4= +golang.org/x/crypto v0.17.0 h1:r8bRNjWL3GshPW3gkd+RpvzWrZAwPS49OmTGZ/uhM4k= +golang.org/x/crypto v0.17.0/go.mod h1:gCAAfMLgwOJRpTjQ2zCCt2OcSfYMTeZVSRtQlPC7Nq4= golang.org/x/net v0.17.0 h1:pVaXccu2ozPjCXewfr1S7xza/zcXTity9cCdXQYSjIM= golang.org/x/net v0.17.0/go.mod h1:NxSsAGuq816PNPmqtQdLE42eU2Fs7NoRIZrHJAlaCOE= -golang.org/x/text v0.13.0 h1:ablQoSUd0tRdKxZewP80B+BaqeKJuVhuRxj/dkrun3k= -golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= +golang.org/x/text v0.14.0 h1:ScX5w1eTa3QqT8oi6+ziP7dTV1S2+ALU0bI+0zXKWiQ= +golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= diff --git a/scmdhttpd.go b/scmdhttpd.go index 65f7b3f..649bb9d 100644 --- a/scmdhttpd.go +++ b/scmdhttpd.go @@ -25,7 +25,7 @@ import ( const ( certsDir = "certs" programName = "scmdHTTPd" - programVersion = "2.2.0" + programVersion = "2.2.1" ) var (