This is a Github Action that will automatically update the
context.tf file in the calling repo against the most recent version published by Cloud Posse. If a new version is detected, a Pull Request will be opened to update it.
If the repo version is found to be out of date, a pull request is opened to update it.
Copy this repository's
.github/workflows/auto-context.yml file into the
.github/workflows folder of the repository to which you'd like to add Terraform Auto-context functionality.
This will cause Auto-context functionality to execute daily at the time specified by the
cron option (all times are UTC).
If you'd like to modify the schedule of the Auto-context action, you can follow the standard cron syntax, as detailed below:
# Example of job definition:
# .---------------- minute (0 - 59)
# | .------------- hour (0 - 23)
# | | .---------- day of month (1 - 31)
# | | | .------- month (1 - 12) OR jan,feb,mar,apr ...
# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat
# | | | | |
# * * * * * user-name command to be executed
# Update README.md nightly at 4am UTC
- cron: '0 4 * * *'
The default username and email address attached to the commits generated by the Auto-context action are
[email protected]. If you would like to change these defaults, please set the
bot-email inputs in the workflow file:
Here's how to get started...
- Copy this repository's
.github/workflows/auto-context.ymlfile into the
.github/workflowsfolder of the repository to which you'd like to add Terraform Auto-context functionality.
- (Optional) Update the
auto-context.ymlto a fixed version. Consult https://github.com/cloudposse/github-action-auto-context/releases for a list of available versions.
Here are some real world examples:
github-action-auto-context- Cloud Posse's self-testing Auto-context GitHub Action