{"id":19096603,"url":"https://github.com/sapcc/go-makefile-maker","last_synced_at":"2025-04-30T14:15:20.476Z","repository":{"id":37275444,"uuid":"302295287","full_name":"sapcc/go-makefile-maker","owner":"sapcc","description":"Makes a Makefile for a Go application","archived":false,"fork":false,"pushed_at":"2024-04-12T13:13:54.000Z","size":756,"stargazers_count":9,"open_issues_count":3,"forks_count":1,"subscribers_count":39,"default_branch":"main","last_synced_at":"2024-04-12T16:35:02.011Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sapcc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2020-10-08T09:42:23.000Z","updated_at":"2024-04-15T15:13:10.121Z","dependencies_parsed_at":"2023-12-23T01:28:34.922Z","dependency_job_id":"161ac628-a15a-4bab-b37b-5fe837625320","html_url":"https://github.com/sapcc/go-makefile-maker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fgo-makefile-maker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fgo-makefile-maker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fgo-makefile-maker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sapcc%2Fgo-makefile-maker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sapcc","download_url":"https://codeload.github.com/sapcc/go-makefile-maker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223783455,"owners_count":17201900,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T03:37:12.993Z","updated_at":"2025-04-18T15:33:55.666Z","avatar_url":"https://github.com/sapcc.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003c!--\nSPDX-FileCopyrightText: SAP SE\nSPDX-License-Identifier: Apache-2.0\n--\u003e\n\n# go-makefile-maker\n\n[![CI](https://github.com/sapcc/go-makefile-maker/actions/workflows/ci.yaml/badge.svg)](https://github.com/sapcc/go-makefile-maker/actions/workflows/ci.yaml)\n\nGenerates a Makefile and optionally also GitHub workflows and a Dockerfile for your Go application:\n\n* Makefile follows established Unix conventions for installing and packaging,\n  and includes targets for vendoring, running tests and checking code quality.\n* GitHub Workflows use [GitHub Actions](https://github.com/features/actions) to lint,\n  build, and test your code. Additionally, you can enable workflows for checking your\n  codebase for security issues (e.g. [CodeQL] code scanning), spelling errors, and missing\n  license headers.\n\nThis project is based on the idea to have as many options as necessary but as little as possible.\nNot every part of the program is configurable (see #configuration), some things are hardcoded or implicit (see #implicit-configuration).\nIf more options are required or some assumptions are wrong, please get in touch.\n\n## Installation\n\nThe easiest way to get `go-makefile-maker` is: `go install github.com/sapcc/go-makefile-maker@latest`.\n\nWe also support the usual Makefile invocations: `make`, `make check`, and `make install`. The latter understands the conventional environment variables for choosing install locations: `DESTDIR` and `PREFIX`.\n\nYou usually want something like `make \u0026\u0026 sudo make install PREFIX=/usr/local`.\n\n## Usage\n\nPut a `Makefile.maker.yaml` file in your Git repository's root directory, then run the following to generate Makefile and GitHub workflows:\n\n```sh\n$ go-makefile-maker\n```\n\n`go-makefile-maker` also generates a `help` target for usage info:\n\n```sh\n$ make help\n```\n\nIn addition to the `Makefile.maker.yaml`, you should also commit the `Makefile` file so that your users don't need to have `go-makefile-maker` installed.\n\n## Implicit Configuration\n\n### Dependency licenses\n\nThe `check-dependency-licenses` make target and the `checks` github workflow use (go-licence-detector)[go-licence-detector] to check all dependencies to have compliant licenses.\nSee [license-scan-rules.json](./internal/makefile/license-scan-rules.json) for an incomplete list of licenses which is based on [SPDX licenses](https://spdx.org/licenses/) and [the internal risk analysis](https://wiki.one.int.sap/wiki/display/ospodocs/Licenses#Licenses-OpenSourceLicensesCategorization).\nIf the automatic license detection is not working, overrides can be specific in the [license-scan-overrides.jsonl](./internal/makefile/license-scan-overrides.jsonl) file.\n\n## Configuration\n\n`go-makefile-maker` requires a config file (`Makefile.maker.yaml`) in the [YAML format][yaml].\n\nTake a look at `go-makefile-maker`'s [own config file](./Makefile.maker.yaml) for an example of what a config could like.\n\nThe config file has the following sections:\n\n* [binaries](#binaries)\n* [coverageTest](#coveragetest)\n* [dockerfile](#dockerfile)\n* [golang](#golang)\n* [golangciLint](#golangcilint)\n* [goReleaser](#goreleaser)\n* [makefile](#makefile)\n* [reuse](#reuse)\n* [metadata](#metadata)\n* [renovate](#renovate)\n* [spellCheck](#spellcheck)\n* [testPackages](#testpackages)\n* [variables](#variables)\n* [verbatim](#verbatim)\n* [githubWorkflow](#githubworkflow)\n  * [githubWorkflow\\.global](#githubworkflowglobal)\n  * [githubWorkflow\\.ci](#githubworkflowci)\n  * [githubWorkflow\\.pushContainerToGhcr](#githubworkflowpushcontainertoghcr)\n  * [githubWorkflow\\.release](#githubworkflowrelease)\n  * [githubWorkflow\\.securityChecks](#githubworkflowsecuritychecks)\n  * [githubWorkflow\\.license](#githubworkflowlicense)\n\n### `binaries`\n\n```yaml\nbinaries:\n  - name: example\n    fromPackage: ./cmd/example\n    installTo: bin/\n  - name: test-helper\n    fromPackage: ./cmd/test-helper\n```\n\nFor each binary specified here, a target will be generated that builds it with `go build` and puts it in `build/$NAME`.\nThe `fromPackage` is a Go module path relative to the directory containing the Makefile.\n\nIf `installTo` is set for at least one binary, the `install` target is added to the Makefile, and all binaries with `installTo` are installed by it.\nIn this case, `example` would be installed as `/usr/bin/example` by default, and `test-helper` would not be installed.\n\n### `controllerGen`\n\n```yaml\ncontrollerGen:\n  enabled: true\n  crdOutputPath: config/crd/bases\n  objectHeaderFile: boilerplate.go.txt\n  rbacRoleName: manager-role\n```\n\nCustomization options for controller-gen.\n\n`enabled` defaults to the presence of the `sigs.k8s.io/controller-runtime` dependency unless set explicitly.\n\n`crdOutputPath` allows changing the `output:crd:artifacts:config` argument given to `controller-gen rbac`. Defaults to `crd`.\n\n`objectHeaderFile` allows changing the `headerFile` argument given to `controller-gen object`.\n\n`rbacRoleName` allows changing the `roleName` argument given to controller-gen rbac. Defaults to the last element in the go module name.\n\n### `coverageTest`\n\n```yaml\ncoverageTest:\n  only: '/internal'\n  except: '/test/util|/test/mock'\n```\n\nWhen `make check` runs `go test`, it produces a test coverage report.\nBy default, all packages inside the repository are subject to coverage testing, but this section can be used to restrict this.\n\nThe values in `only` and `except` are regexes for `grep -E`.\nSince only entire packages (not single source files) can be selected for coverage testing, the regexes have to match package names, not on file names.\n\n### `dockerfile`\n\n```yaml\ndockerfile:\n  enabled: true\n  entrypoint: [ \"/bin/bash\", \"--\", \"--arg\" ]\n  extraBuildStages:\n    - |\n      FROM ghcr.io/foobar/big-toolbox AS toolbox\n      RUN toolbox-cmd\n  extraDirectives:\n    - 'LABEL mylabel=myvalue'\n    - 'COPY --from=toolbox /bin/fancytool /usr/bin/fancytool'\n  extraIgnores:\n    - tmp\n    - files\n  extraPackages:\n    - curl\n    - openssl\n  runAsRoot: true\n  withLinkerdAwait: true\n```\n\nWhen `enabled`, go-makefile-maker will generate a `Dockerfile` and a `.dockerignore` file.\nThe Dockerfile uses the [Golang base image](https://hub.docker.com/_/golang) to run `make install`, then copies all installed files into a fresh [Alpine base image](https://hub.docker.com/_/alpine).\nThe image is provisioned with a dedicated user account (name `appuser`, UID 4200, home directory `/home/appuser`) and user group (name `appgroup`, GID 4200) with stable names and IDs.\nThis user account is intended for use with all payloads that do not require a root user.\n\nTo ensure that the resulting Docker Image is functional, tests should be run before the image is built and uploaded.\nAs an additional smoke test, the compiled binaries are invoked with the `--version` argument after being copied to the final image.\nWith [go-api-declarations](https://github.com/sapcc/go-api-declarations)'s [`bininfo.HandleVersionArgument` function](https://pkg.go.dev/github.com/sapcc/go-api-declarations/bininfo#HandleVersionArgument), this can be implemented in one line. If you are using Cobra or any other library to handle arguments, the [`bininfo.Version` function](https://pkg.go.dev/github.com/sapcc/go-api-declarations/bininfo#Version) is recommended instead.\n\n* `entrypoint` allows overwriting the final entrypoint.\n* `extraBuildStages` prepends additional build stages at the top of the Dockerfile. This is useful for bringing in precompiled assets from other images, or if a non-Go compilation step is required.\n* `extraDirectives` appends additional directives near the end of the Dockerfile.\n* `extraIgnores` appends entries in `.dockerignore` to the default ones.\n* `extraPackages` installs extra Alpine packages in the final Docker layer. `ca-certificates` is always installed.\n* `runAsRoot` skips the privilege drop in the Dockerfile, i.e. the `USER appuser:appgroup` command is not added.\n* `withLinkerdAwait` whether to download the binary and prepend linkerd-await to the entrypoint. For more details see \u003chttps://github.com/linkerd/linkerd-await\u003e.\n\n### `golang`\n\n```yaml\ngolang:\n  enableVendoring: true\n  ldflags: -X \"main.goversion={{.Env.GOVERSION}}\"\n  setGoModVersion: true\n```\n\nSet `golang.enableVendoring` to `true` if you vendor all dependencies in your repository. With vendoring enabled:\n\n1. The default for `GO_BUILDFLAGS` is set to `-mod vendor`, so that build targets default to using vendored dependencies.\n  This means that building binaries does not require a network connection.\n2. The `make tidy-deps` target is replaced by a `make vendor` target that runs `go mod tidy \u0026\u0026 go mod verify` just like `make tidy-deps`, but also runs `go\n  mod vendor`.\n  This target can be used to get the vendor directory up-to-date before commits.\n\nIf `golang.setGoModVersion` is set to `true` then `go.mod` will be automatically updated to the latest version.\nThe `ldflags` option can be used to share flags between the Makefile and GoReleaser.\n\n### `golangciLint`\n\n```yaml\ngolangciLint:\n  createConfig: true\n  errcheckExcludes:\n    - io/ioutil.ReadFile\n    - io.Copy(*bytes.Buffer)\n    - io.Copy(os.Stdout)\n    - (*net/http.Client).Do\n  skipDirs:\n    - easypg/migrate/*\n```\n\nThe `make check` and `make static-check` targets use [`golangci-lint`](https://golangci-lint.run) to lint your code.\n\nIf `createConfig` is set to `true` then `go-makefile-maker` will create a\nconfig file (`.golangci.yaml`) for `golangci-lint` and keep it up-to-date (in case of new changes).\nThis config file enables extra linters in addition to the default ones and configures various settings that can improve code quality.\n\nAdditionally, if `createConfig` is `true`, you can specify a list of files skipped entirely by golangci-lint in `skipDirs`\nand a list of functions to be excluded from `errcheck` linter in `errcheckExcludes` field.\nRefer to [`errcheck`'s README](https://github.com/kisielk/errcheck#excluding-functions) for info on the format\nfor function signatures that `errcheck` accepts.\n\nTake a look at `go-makefile-maker`'s own [`golangci-lint` config file](./.golangci.yaml) for an up-to-date example of what the generated config would look like.\n\n### `goReleaser`\n\n```yaml\ngoReleaser:\n  createConfig: true\n  binaryName: \"{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}\"\n  format: .tar.gz\n  nameTemplate: \"{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}\"\n```\n\nIf `goReleaser.createConfig` is set to true or it is unset but the release GitHub Workflow is enabled, a config file for goreleaser will be generated based on the metadata of the repository.\nThe `format` option can be used to only upload binaries. It corresponds to the upstream archives[].format option. See \u003chttps://goreleaser.com/customization/archive/\u003e for more details.\nThe `binaryName` option can be used to change the name of the compiled binaries. It corresponds to the upstream builds[].binary option. This is only really useful when format is set to binary. It defaults to name of the first entry in the binaries option.\nThe `nameTemplate` option can be used to change the name of uploaded release artefacts. It corresponds to the upstream archives[].name_template option.\nThe `files` option can be used to add extra files. For backwards compatibility it defaults to `[ CHANGELOG.md, LICENSE, README.md ]`.\n\n### `makefile`\n\n```yaml\nmakefile:\n  enabled: false\n```\n\n`makefile` contains settings related to the higher level `Makefile` generation.\n\n`enabled` is an optional setting to disable the `Makefile` generation completely.\nIf not specified, the setting is treated as being set to true to maintain backwards compatibility with older configs.\n\n### `reuse`\n\n```yaml\nreuse:\n  enabled: false\n```\n\n`reuse` contains settings related to the [REUSE](https://reuse.software/) config generation.\n\n`enabled` is an optional setting to disable the REUSE config generation completely.\nIf not specified, the setting is treated as being set to true to maintain backwards compatibility with older configs.\n\n### `metadata`\n\n```yaml\nmetadata:\n  url: https://github.com/foo/bar\n```\n\n`metadata` contains information about the project which cannot be guessed consistently:\n\n- `url` is the repository's remote URL.\n\n### `nix`\n\n```yaml\nnix:\n  extraLibraries:\n    - curl\n  extraPackages:\n    - mockgen\n    - pkg-config\n```\n\n`extraLibraries` extra packages to add to buildInputs in the generated `shell.nix` file. This is useful for libraries like curl for go-curl.\n`extraPackages` extra packages to add to nativeBuildInputs in the generated `shell.nix` file. This is useful if entries in `verbatim` require additional tools.\n\n See \u003chttps://search.nixos.org/\u003e for available packages and libraries.\n\n### `renovate`\n\n```yaml\nrenovate:\n  enabled: true\n  assignees:\n    - devnull\n    - urandom\n  goVersion: 1.18\n  packageRules:\n    - matchPackageNames: []\n      matchUpdateTypes: []\n      matchDepTypes: []\n      matchFileNames: []\n      extends: []\n      allowedVersions: \"\"\n      minimumReleaseAge: \"\"\n      autoMerge: false\n      enabled: false\n  customManagers: []\n```\n\nGenerate [RenovateBot](https://renovatebot.com/) config to automatically create pull requests weekly on Fridays with dependency updates.\n\nTo assign people to the PRs created by renovate, add their GitHub handle to the `assignees` list.\n\nOptionally overwrite go version with `goVersion`, by default the Go version from `go.mod` file will be used.\n\nAdditionally, you can also define [`packageRules`](https://docs.renovatebot.com/configuration-options/#packagerules). Note that only the fields mentioned above are accepted when defining a `packageRule`. The following package rules are defined by default:\n\n```yaml\npackageRules:\n  # Group PRs for library dependencies together.\n  - matchPackageNames: [ \"!/^github\\\\.com\\\\/sapcc\\\\/.*/\", \"/.*/\" ]\n    groupName: \"External dependencies\"\n    automerge: false\n  - matchPackageNames: [ \"/^github\\\\.com\\\\/sapcc\\\\/.*/\" ]\n    groupName: \"github.com/sapcc\"\n    automerge: true\n\n  # This package rule will be added if go.mod file has a `k8s.io/*` dependency.\n  - matchPackagePrefixes: [\"/^k8s.io\\\\//\"]\n    allowedVersions: 0.28.x\n\n  # Restrict updates for versions managed by go-makefile-maker.\n  - matchPackageNames: [ golang ]\n    allowedVersions: $goVersion.x # only update within the same minor release\n  - matchDepTypes: [ action ]\n    enabled: false # see githubWorkflow config section below\n  - matchDepTypes: [ dockerfile ]\n    enabled: false # see docker config section above\n```\n\nYou can also define [`customManagers`](https://docs.renovatebot.com/modules/manager/regex/). An example to detect `ENVTEST_K8S_VERSION` env variable version and update it in `Makefile`\n\n```yaml\ncustomManagers:\n  - customType: \"regex\"\n    description: \"Bump envtest version in the Makefile\"\n    fileMatch: [\n      \"^Makefile$\"\n    ]\n    matchStrings: [\n      \"ENVTEST_K8S_VERSION\\\\s*\\\\?=\\\\s*(?\u003ccurrentValue\u003e.?(?:\\\\d+\\\\.){0,2}\\\\d+)\"\n    ]\n    datasourceTemplate: \"github-tags\"\n    depNameTemplate: \"kubernetes-sigs/controller-tools\"\n    extractVersionTemplate: \"^envtest.v(?\u003cversion\u003e.*)$\"\n```\n\n### `spellCheck`\n\n```yaml\nspellCheck:\n  ignoreWords:\n    - example\n    - exampleTwo\n```\n\n`golangci-lint` (if `golangciLint.createConfig` is `true`) and the spell check GitHub workflow (`githubWorkflow.spellCheck`) use [`misspell`][misspell] to check for spelling errors.\n\nIf `spellCheck.ignoreWords` is defined then both `golangci-lint` and spell check workflow will give this word list to `misspell` so that they can be ignored during its checks.\n\n\n### `testPackages`\n\n```yaml\ntestPackages:\n  only: '/internal'\n  except: '/test/util|/test/mock'\n```\n\nBy default, all packages inside the repository are subject to testing, but this section can be used to restrict this.\n\nThe values in `only` and `except` are regexes for `grep -E`.\nSince only entire packages (not single source files) can be selected for testing, the regexes have to match package names, not on file names.\n\n### `variables`\n\n```yaml\nvariables:\n  GO_BUILDENV: ''\n  GO_BUILDFLAGS: '-mod vendor'\n  GO_LDFLAGS: ''\n  GO_TESTENV: ''\n```\n\nAllows to override the default values of Makefile variables used by the autogenerated recipes.\nThis mechanism cannot be used to define new variables to use in your own rules; use `verbatim` for that.\nBy default, all accepted variables are empty.\nThe only exception is that `GO_BUILDFLAGS` defaults to `-mod vendor` when vendoring is enabled (see below).\n\nA typical usage of `GO_LDFLAGS` is to give compile-time values to the Go compiler with the `-X` linker flag:\n\n```yaml\nvariables:\n  GO_LDFLAGS: '-X github.com/foo/bar.Version = $(shell git describe --abbrev=7)'\n```\n\nHowever, for this specific usecase, we suggest that your application use `github.com/sapcc/go-api-declarations/bininfo`\ninstead. When the respective module is present as a direct dependency in the `go.mod` file, go-makefile-maker will\nauto-generate suitable linker flags to fill the global variables in the `bininfo` package.\n\n`GO_TESTENV` can contain environment variables to pass to `go test`:\n\n```yaml\nvariables:\n  GO_TESTENV: 'POSTGRES_HOST=localhost POSTGRES_DATABASE=unittestdb'\n```\n\n`GO_BUILDENV` can contain environment variables to pass to `go build`:\n\n```yaml\nvariables:\n  GO_BUILDENV: 'CGO_CFLAGS=-D_LARGEFILE64_SOURCE'\n```\n\n### `verbatim`\n\n```yaml\nverbatim: |\n  run-example: build/example\n    ./build/example example-config.txt\n```\n\nThis field can be used to add your own definitions and rules to the Makefile.\nThe text in this field is copied into the Makefile mostly verbatim, with one exception:\nSince YAML does not like tabs for indentation, we allow rule recipes to be indented with spaces.\nThis indentation will be replaced with tabs before writing it into the actual Makefile.\n\n### `githubWorkflow`\n\nThe `githubWorkflow` section holds configuration options that define the behavior of various GitHub workflows.\n\n**Hint**: You can prevent the workflows from running by including `[ci skip]` in your commit message\n([more info](https://github.blog/changelog/2021-02-08-github-actions-skip-pull-request-and-push-workflows-with-skip-ci/)).\n\n#### `githubWorkflow.global`\n\nThis section defines global settings that apply to all workflows. If the same setting is\nsupported by a specific workflow and is defined then that will take override its global\nvalue.\n\n```yaml\nglobal:\n  defaultBranch: dev\n  goVersion: 1.18\n```\n\n`defaultBranch` specifies the Git branch on which `push` actions will trigger the\nworkflows. This does not affect pull requests, they will automatically trigger all\nworkflows regardless of which branch they are working against. `go-makefile-maker` will\nautomatically run `git symbolic-ref refs/remotes/origin/HEAD | sed\n's@^refs/remotes/origin/@@'` and use its value by default.\n\n`goVersion` specifies the Go version that is used for jobs that require Go.\n`go-makefile-maker` will automatically retrieve the Go version from `go.mod` file and use\nthat by default.\n\n#### `githubWorkflow.ci`\n\nThis workflow:\n\n* checks your code using `golangci-lint`\n* ensures that your code compiles successfully\n* runs tests and generates test coverage report\n* uploads the test coverage report to [Coveralls]\n\n```yaml\nci:\n  enabled: true\n  runOn:\n    - macos-latest\n    - ubuntu-latest\n    - windows-latest\n  coveralls: true\n  prepareMakeTarget: generate\n  ignorePaths: []\n```\n\n`runOn` specifies a list of machine(s) to run the `build` and `test` jobs on ([more\ninfo][ref-runs-on]). You can use this to ensure that your build compilation and tests are\nsuccessful on multiple operating systems. Default value for this is `ubuntu-latest`.\n\nIf `coveralls` is `true` then your test coverage report will be uploaded to [Coveralls]. Make sure that you have enabled Coveralls for your GitHub repo beforehand.\n\n`ignorePaths` specifies a list of filename patterns. Workflows will not trigger if a path\nname matches a pattern in this list. [More info][ref-onpushpull] and [filter pattern cheat\nsheet][ref-pattern-cheat-sheet]. This option is not defined by default.\n\n`prepareMakeTarget` specifies an additional make target to run before running any ci checks.\nThis is useful when you need to run some additional commands before being able to run `go build` or `golangci-lint`.\nFor example when you are using `mockgen` or `go-bindata` through `verbatim`, you want to run the extra `verbatim` target through this option.\n\nIf your application depends on `github.com/lib/pq`, the latest PostgreSQL server binaries will be available in the container when tests are executed.\nThis is intended for use with `github.com/sapcc/go-bits/easypg`, which can launch a PostgreSQL server during `func TestMain`; see documentation in package easypg for details.\n\n### `githubWorkflow.pushContainerToGhcr`\n\nIf `enabled` is set to true, the generated `Dockerfile` is built for the platforms `linux/amd64` and `linux/arm64` and pushed to the repository path under `ghcr.io`.\n\n```yaml\npushContainerToGhcr:\n  enabled: true\n  platforms: \"linux/amd64,linux/arm64\"\n  tagStrategy:\n    - edge\n    - latest\n    - semver\n    - sha\n```\n\n`platforms` configures for which platforms the multi-arch docker image is built. Defaults to `linux/amd64`. Note: emulation is provided by qemu and might take significant time.\n`tagStrategy` influences which container tags will be pushed. Currently `edge`, `latest`, `semver` and `sha` are supported.\n\n### `githubWorkflow.release`\n\nIf `release` is enabled a workflow is generated which creates a new GitHub release using goreleaser when a git tag is pushed.\n\n`goReleaser.enabled` will be enabled automatically when the option isn't set yet.\n\n#### `githubWorkflow.securityChecks`\n\nIf `securityChecks` is enabled then it will generate the following workflows:\n\n* [CodeQL] workflow will run [CodeQL], GitHub's industry-leading semantic code analysis\n  engine, on your source code to find security vulnerabilities. You can see the security\n  report generated by CodeQL under your repo's Security tab.\n\n  In addition to running the workflow when new code is pushed, this workflow will also run\n  on a weekly basis (every Monday at 07:00 AM) so that existing code can be checked for\n  new vulnerabilities.\n\n* [dependency-review] workflow will scan your pull requests for dependency changes and\n  will raise an error if any new dependencies have existing vulnerabilities.\n  It uses the [GitHub Advisory Database](https://github.com/advisories) as a source.\n\n* [govulncheck] workflow will scan your dependencies for vulnerabilities and\n  will raise an error if any dependency has an existing vulnerability and the code path is in use.\n  It uses the [Go Vulnerability Database](https://pkg.go.dev/vuln/) as a source.\n\n```yaml\nsecurityChecks:\n  enabled: true\n```\n\n#### `githubWorkflow.license`\n\nThis workflow uses [`addlicense`][addlicense] to ensure that all your Go source code files have a license header.\nIf vendoring is enabled, the `vendor/` directory is always entirely ignored by this workflow.\n\n```yaml\nlicense:\n  enabled: true\n  ignorePatterns:\n    - \"vendor/**\"\n```\n\n`ignorePatterns` specifies a list of file patterns to check. You can use any pattern\n[supported by doublestar][doublestar-pattern]. See `addlicense`'s [README][addlicense] for more info.\n\n**Hint**: You can also use `addlicense` to add license headers to all unignored Go files by running `make license-headers`.\n\n[codeql]: https://codeql.github.com/\n[coveralls]: https://coveralls.io\n[doublestar-pattern]: https://github.com/bmatcuk/doublestar#patterns\n[go-licence-detector]: https://github.com/elastic/go-licence-detector\n[govulncheck]: https://github.com/golang/vuln\n[misspell]: https://github.com/client9/misspell\n[ref-onpushpull]: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestpaths\n[ref-pattern-cheat-sheet]: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#filter-pattern-cheat-sheet\n[ref-runs-on]: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on\n[yaml]: https://yaml.org/\n[addlicense]: https://github.com/google/addlicense\n[dependency-review]: https://github.com/actions/dependency-review-action\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fgo-makefile-maker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsapcc%2Fgo-makefile-maker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsapcc%2Fgo-makefile-maker/lists"}