Skip to content
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

automating maintenance with Github actions #179

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .github/workflows/maintenance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
on:
push:
branches: [ master ]
schedule:
- cron: '*/5 * * * *'
workflow_dispatch: # Enables on-demand/manual triggering
jobs:
job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
- run: |
git submodule update --remote
cd tools/magic-modules/mmv1
bundle install
bundle exec compiler -a --force tflint -v ga -e terraform -o ../../../rules/magicmodules
gofmt -s -w ../../../rules/magicmodules/*.go
- uses: peter-evans/create-pull-request@v4
with:
commit-message: |
autogenerated maintenance
title: autogenerated maintenance
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)