Commit Graph

38 Commits

Author SHA1 Message Date
nathannaveen
f5acb9d12a Updated workflow permissions. (#5216) 2022-03-02 04:47:08 -08:00
Yong Tang
6c26446bb7 Fix pinning of github actions (#5213)
It is recommended to pin github actions with hash so that an action
is not posing an unknown security risk (as the actions itself is not
written by us).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-03-01 11:32:00 -08:00
Yong Tang
402c08fea0 Add OSSF Security Scoreboard Scan (#5208)
* Add OSSF Security Scoreboard Scan

This PR adds OSSF's Security Scoreboard Scan, to help tighten CoreDNS's security practice.

OSSF Scoreboard is recommended by GitHub. The result will show up in project's "Code Scanning Alerts" (together with existing CodeQL scan we already have).

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-02-28 12:02:03 -05:00
Yong Tang
5bb8947309 Add Reviewdog to suggestion gofmt and whitespace changes in pull request (#5155)
use reviewdog to automatically suggest whitespace corrections in PRs
so that code will be clean before committing into master branch.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-02-17 15:12:03 -05:00
Yong Tang
40a526b27f Stale-bot: Do not mark issues stale when pending maintainer action (#5156)
Only adds stale with labels 'answered,needs info' in issues and 'needs update' in PRs

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-02-09 08:41:05 -05:00
Yong Tang
8509fb569d Add github actions for docker release. (#5146)
* Add github actions for docker release.

Once a release/tag shown up in GitHub,
an GitHub Action will be automatically triggered
for docker release.

This will help avoid additional steps when releasing.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Update to address the review

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Address review comment

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-02-03 10:23:39 -08:00
Ben Kochie
7d9ad0872c Cleanup yaml formatting (#5151)
* Add yamllint config.
* Add yamllint workflow.
* Cleanup linting issues.
* Remove unnecessary `set -x -e` from workflows.

Signed-off-by: SuperQ <superq@gmail.com>
2022-02-02 18:11:08 +01:00
Yong Tang
52c057f86f Add enhancement label to the whitelist of issues. (#5129) 2022-01-26 19:16:54 -08:00
Yong Tang
97d6ec2d39 Add stale github action (#5128)
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2022-01-26 16:32:04 -05:00
Miek Gieben
6496b19ea4 docker: test makefile and Dockerfile change (#4866)
The fix in 4b9bc138d9 breaks docker with

~~~
Step 2/9 : RUN sed -i.bak s@stable/update@stable-security/update@g /etc/apt/sources.list
 ---> Running in 29a0dbae5746
no status provided on response: unknown
~~~

So reverted here. This adds github workflows to test Makefile.docker
syntax as well. And small updates to the docker-coredns over in the
release repo.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-09-16 15:51:10 -04:00
dependabot[bot]
9a3e4f6685 build(deps): bump codecov/codecov-action from 2.0.3 to 2.1.0 (#4860)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.3 to 2.1.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.0.3...v2.1.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-09-13 07:15:08 -07:00
Miek Gieben
df92e8a8ca Spun out docker (#4859)
* Spun out docker

Remove docker from Makefile.release so we can actually release.
Unify the mips stuff, now that docker is gone.
Update the docs to reflect this.

See #4858

Signed-off-by: Miek Gieben <miek@miek.nl>

* Update test as well

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-09-13 14:47:46 +02:00
Yong Tang
8016f62771 Update golang version to 1.17 (#4852)
* Update golang version to 1.17

This PR updates golang version to 1.17 when applicable.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Remove `^` to avoid cache

This commit removes `^` to avoid cache in build system

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Change to 1.17.0

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2021-09-08 05:23:14 -07:00
dependabot[bot]
2aba89581f build(deps): bump codecov/codecov-action from 2.0.2 to 2.0.3 (#4836)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 2.0.2 to 2.0.3.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v2.0.2...v2.0.3)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-08-30 06:35:46 -07:00
Chris O'Haver
5aae49cee5 fix workflow indent (#4796)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-13 10:39:46 -04:00
Chris O'Haver
486dd900b4 use latest go 1.x available (#4794)
Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-10 16:37:58 +08:00
Chris O'Haver
5e7292b6cc Bump actions use go 1.16 (#4792)
* use go 1.16
* use ^ to allow latest minor/patch version available

Signed-off-by: Chris O'Haver <cohaver@infoblox.com>
2021-08-09 21:50:00 +02:00
dependabot[bot]
ed33f010f3 build(deps): bump codecov/codecov-action from 1 to 2.0.2 (#4768)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 1 to 2.0.2.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/master/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v1...v2.0.2)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-07-26 06:20:32 -07:00
Yong Tang
c996a26364 Add verbose log in GitHub Actions CI for make -f Makefile.doc (#4681)
Our GitHub Actions CI is having some issues with `make -f Makefile.doc`
as the related changes that should have triggered the build didn't
work for the past 3 months (since march).

This PR adds verbose to GitHub Actions CI to see if we can get more information.

Note this PR just add `set -x` to show detailed step. Will not impact anything else.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2021-06-08 09:26:38 -07:00
Yong Tang
cedf6ffddc Disable CodeCov on commit push (#4572)
As commit push holds write access of GITHUB_TOKEN, we may
want to limit the scope of third-party test run.

This PR disable CodeCov on commit push. Pull request is still
ok.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2021-04-16 07:38:42 -07:00
Miek Gieben
1b2f0bef6f workflow: move committing workflows to schedule (#4529)
This moves all workflows that commit to a schedule, so that it _doesn't_
push into peoples PRs as that enlarges them and is just non-obvious.

They run throughout the week.

Also change the "user" we use for this, so that DCO believes it a real
email address (DCO is pretty stupid here). Update the authors target to
filter out this bot as well.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-18 09:53:46 +01:00
Miek Gieben
5457cdcd4b workflow: sign commits (#4526)
This doesn't do much, but at least it doesn't litter PRs with non-signed
commits. This should keep the DCO clean(er)

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-17 14:16:17 +01:00
Miek Gieben
a2b34a233d workflow: guard against faillint failing (#4524)
So there is (and will always) be a disconnect between latest Go in the
workflow and the actual latest Go used by other utils. Faillint move to
go 1.16 features and for some reason this now borkes.

Add ||true to allow failling to not compile, this will skip that
particular test (so be it)

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-16 11:11:12 +01:00
Miek Gieben
c27605797b Use latest Go version (#4505)
Update go.mod to 1.16 and make the workflows default to the latest
available.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-03-09 09:16:05 -08:00
Miek Gieben
9d3a84377c Makefile.release: do a complete dry-run (#4488)
Just dry-run all important targets.

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-02-24 10:03:16 -08:00
Miek Gieben
908622a664 Fix go-test yaml (#4481)
unsure why this only pops up, but the yaml was not correct for this
workflow. Randomly added whitespace until it parsed as proper yaml

Signed-off-by: Miek Gieben <miek@miek.nl>
2021-02-23 14:12:00 +01:00
Miek Gieben
1db575a2ce A noop target to Makefile.release and run it in CI (#4462) 2021-02-13 05:03:22 -08:00
Yong Tang
619a0aedc0 Switch from actions/setup-go@v2-beta to actions/setup-go@v2 to fix the GitHub Actions set-env failure (#4302)
This PR switches from actions/setup-go@v2-beta to actions/setup-go@v2 to fix the
GitHub Actions `set-env` failure. Without this PR the following error shown up
(see https://github.com/coredns/coredns/runs/1423802307):
```
Error: Unable to process command '::set-env name=GOROOT::/opt/hostedtoolcache/go/1.15.5/x64' successfully.
7
Error: The `set-env` command is disabled. Please upgrade to using Environment Files or opt into unsecure command execution by setting the `ACTIONS_ALLOW_UNSECURE_COMMANDS` environment variable to `true`. For more information see: https://github.blog/changelog/2020-10-01-github-actions-deprecating-set-env-and-add-path-commands/
```

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-19 15:40:41 -05:00
Yong Tang
2845eaa916 Fix missing * in Go Fmt GitHub Actions (#4277)
Looks like one `*` is missing in Go Fmt GitHub Actions
and that causes the Actions not being triggered.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-11 07:43:46 +01:00
Yong Tang
37e3a81f25 Remove redundant '' as Linux does not need it.
Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-07 10:57:02 -08:00
Yong Tang
263423edad Setup GitHub Actions for auto remove trailing whitespaces (#4269)
* Setup GitHub Actions for auto remove trailing whitespaces

This PR setup GitHub Actions for auto remove trailing whitespaces,
if any non-go files are touched (.git directory are ignored)

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Remove TestTrailingWhitespace in presubmit tests

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* paths and paths-ignore are mutually exlcusive so only keep paths-ignore

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Remove redundent bufio import

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-07 10:53:20 -08:00
Yong Tang
67f2048bb0 Add GitHub Actions to gofmt -s -w all *.go files (#4268)
* Add GitHub Actions to  `gofmt -s -w` all `*.go` files

This PR adds GitHub Actions to  `gofmt -s -w` all `*.go` files,
if any `*.go` files are touched on each commit.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>

* Change go-mod-fmt to go-fmt

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2020-11-06 17:44:11 +01:00
Miek Gieben
cd5ee7d1f0 Remove travis and move to github workflow (#4267)
Add github testing workflow, simplify the Makefile because that was
complex because of Travis. Remove the fuzzing, needs to be re-added when
that works properly with go modules (it has been disabled for quite some
time). Multiple builds and files have been added so these tests can all
run in parallel. Our testing now tests a couple of minutes, the codeql
is by far the more expensive.

Move metric's naming test to test/presubmit_test.go

Add longer sleep in the TestAutoAXFR.

Bye bye travis!

Closes: #4266

Signed-off-by: Miek Gieben <miek@miek.nl>
2020-11-06 14:14:26 +01:00
Miek Gieben
57e6c56bfc Create codeql-analysis.yml (#4264)
Setup CodeQL to check are code - seems we're in the beta. (is this still beta?)
2020-11-05 16:06:32 +01:00
Ben Kochie
d4cac0c43a Move doc test to workflow (#3800)
Replace doc CI test with automatic workflow.

Signed-off-by: Ben Kochie <superq@gmail.com>
2020-03-31 16:18:10 +02:00
Michael Grosser
dd58f046de Use latest Github checkout action (#3627)
Signed-off-by: Michael Grosser <development@stp-ip.net>
2020-01-27 08:50:29 -08:00
Yong Tang
6cf1c086ac Update auto go mod tidy workflow to remove user association (#3517)
This PR updates go.tidy.yml, and use pseudo name
`coredns-auto-go-mod-tidy[bot]`, so that the commit
is not associated with real user. Otherwise
the commit history could be confusing.

This is similar to what `dependabot[bot]` is doing
for commits generated by bots.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-12-07 23:45:27 +00:00
Yong Tang
0a6100048d Setup GitHub Workflow for auto go tidy (#3512)
Setup GitHub Workflow for auto `go tidy`, when
- 'go.mod'
- 'go.sum'
- '.github/workflows/go.tidy.yml'
has been touched.

Signed-off-by: Yong Tang <yong.tang.github@outlook.com>
2019-12-07 15:49:38 +00:00