Skip to content

Commit 85d97d6

Browse files
authored
Merge pull request #16 from pbs/chore/updates_from_template
Updates from template
2 parents 18840a9 + 9df8cd2 commit 85d97d6

File tree

2 files changed

+20
-8
lines changed

2 files changed

+20
-8
lines changed

.github/workflows/document.yml

+17-5
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,12 @@ jobs:
2121
- name: "Checkout"
2222
uses: actions/checkout@main
2323

24+
# This makes it easier to push changes back to the PR
25+
- name: "Checkout w/ gh"
26+
run: gh pr checkout ${{ github.event.pull_request.number}}
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
2430
- name: Setup asdf
2531
uses: asdf-vm/actions/setup@v2
2632

@@ -40,15 +46,21 @@ jobs:
4046
env:
4147
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4248

43-
- name: "Confirm"
49+
- name: "Commit if Necessary"
4450
run: |
4551
if [[ "$(basename "$(git rev-parse --show-toplevel)")" != *'terraform-aws-template'* ]]; then
4652
echo "Setting core.fileMode to false to avoid false positives in documentation check."
4753
git config core.fileMode false
4854
if [[ -n $(git status --porcelain) ]]; then
49-
echo "Documentation is not up to date. Run ./scripts/document.sh"
50-
git status -v
51-
git diff
52-
exit 1
55+
echo "Documentation is not up to date. Comitting updates"
56+
57+
git add README.md
58+
git config user.name "${GITHUB_USERNAME}"
59+
git config user.email "${GITHUB_USERNAME}@users.noreply.github.com"
60+
git commit -m "Running document script"
61+
git push
5362
fi
5463
fi
64+
env:
65+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
66+
GITHUB_USERNAME: ${{ github.actor }}

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
Use this URL for the source of the module. See the usage examples below for more details.
88

99
```hcl
10-
github.com/pbs/terraform-aws-lambda-cron-module?ref=0.1.8
10+
github.com/pbs/terraform-aws-lambda-cron-module?ref=x.y.z
1111
```
1212

1313
### Alternative Installation Methods
@@ -22,7 +22,7 @@ Integrate this module like so:
2222

2323
```hcl
2424
module "lambda-cron" {
25-
source = "github.com/pbs/terraform-aws-lambda-cron-module?ref=0.1.8"
25+
source = "github.com/pbs/terraform-aws-lambda-cron-module?ref=x.y.z"
2626
2727
# Required Parameters
2828
handler = "main"
@@ -44,7 +44,7 @@ module "lambda-cron" {
4444

4545
If this repo is added as a subtree, then the version of the module should be close to the version shown here:
4646

47-
`0.1.8`
47+
`x.y.z`
4848

4949
Note, however that subtrees can be altered as desired within repositories.
5050

0 commit comments

Comments
 (0)