generated from cloudposse/terraform-example-module
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (46 loc) · 1.84 KB
/
auto-readme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: "auto-readme"
on:
schedule:
# Update context.tf nightly
- cron: '0 3 * * *'
jobs:
update:
if: github.event_name == 'schedule'
runs-on: ubuntu-latest
container: cloudposse/build-harness:slim-latest
steps:
- uses: actions/checkout@v2
- name: Update context.tf
shell: bash
id: update
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
wget https://raw.githubusercontent.com/Dabble-of-DevOps-BioHub/biohub-info/master/docs/README.md.gotmpl -O /tmp/README.md.gotmpl
make README_TEMPLATE_FILE=/tmp/README.md.gotmpl BUILD_HARNESS_PATH=/build-harness PACKAGES_PREFER_HOST=true -f /build-harness/templates/Makefile.build-harness readme
if git diff --no-patch --exit-code context.tf; then
echo "No changes detected! Exiting the job..."
else
echo "README file has changed. Update examples and rebuild README.md."
echo "::set-output name=create_pull_request::true"
fi
- name: Create Pull Request
if: steps.update.outputs.create_pull_request == 'true'
uses: cloudposse/actions/github/create-pull-request@0.22.0
with:
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }}
committer: 'cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>'
author: 'cloudpossebot <11232728+cloudpossebot@users.noreply.github.com>'
commit-message: Update context.tf from origin source
title: Update context.tf
body: |-
## what
This is an auto-generated PR that updates the `README.md` file to the latest version from `Dabble-of-DevOps-BioHub/biohub-info`
## why
To support all the changes in the main README
branch: auto-update/readme
base: master
delete-branch: true
labels: |
auto-update
readme