-
Notifications
You must be signed in to change notification settings - Fork 76
automating maintenance with Github actions #290
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
709610e
61ab7b1
aa484a2
4845d48
8c93e8f
2662237
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,32 @@ | ||||||
on: | ||||||
push: | ||||||
branches: [ master ] | ||||||
schedule: | ||||||
- cron: '*/5 * * * *' | ||||||
workflow_dispatch: # Enables on-demand/manual triggering | ||||||
jobs: | ||||||
job: | ||||||
runs-on: ubuntu-latest | ||||||
steps: | ||||||
- uses: actions/checkout@v2 | ||||||
with: | ||||||
submodules: true | ||||||
- uses: actions/setup-go@v2 | ||||||
with: | ||||||
go-version: 1.17 | ||||||
- run: | | ||||||
go get github.com/aws/aws-sdk-go | ||||||
go mod tidy | ||||||
go generate ./... | ||||||
cd tools/provider-schema | ||||||
terraform init -upgrade | ||||||
terraform providers schema -json > schema.json | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I'm surprised that ubuntu-latest includes Terraform by default. However, this action may fail when a new version is released. It seems good to pin the version using setup-terraform. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the pointer, considered installing |
||||||
- uses: peter-evans/create-pull-request@v3 | ||||||
PatMyron marked this conversation as resolved.
Show resolved
Hide resolved
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. When this pull request is created, it will not trigger workflows, since GH Actions forbids recursion when using There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. not elegant, but I usually just close/re-open the PRs to manually kick off the tests: added to the body of the generated PRs in case we ever need a reminder about that workaround |
||||||
with: | ||||||
commit-message: | | ||||||
autogenerated maintenance | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
title: autogenerated maintenance | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
Would be nice to append There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. also not elegant, but I've just manually appended version numbers to autogenerated PR titles in the past due to complexities of appending it automatically: |
||||||
delete-branch: true | ||||||
body: | | ||||||
If tests are stuck on https://github.com/peter-evans/create-pull-request/issues/48: | ||||||
["Manually close pull requests and immediately reopen them. This will enable `on: pull_request` workflows to run and be added as checks."](https://github.com/peter-evans/create-pull-request/blob/master/docs/concepts-guidelines.md#triggering-further-workflow-runs) |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,6 @@ terraform { | |
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = "3.70.0" | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems aggressive to run every 5 minutes. I thought it was enough to run it daily. What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
usually unsubscribe from notifications from the generated PRs