-
-
Notifications
You must be signed in to change notification settings - Fork 251
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git.io->cloudposse.tools update (#161)
- Loading branch information
1 parent
1a5ad62
commit a569816
Showing
6 changed files
with
80 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ jobs: | |
- name: Create Pull Request | ||
if: steps.update.outputs.create_pull_request == 'true' | ||
uses: cloudposse/actions/github/create-pull-request@0.22.0 | ||
uses: cloudposse/actions/github/create-pull-request@0.30.0 | ||
with: | ||
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} | ||
committer: 'cloudpossebot <[email protected]>' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: "auto-readme" | ||
on: | ||
workflow_dispatch: | ||
|
||
schedule: | ||
# 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 * * *' | ||
|
||
jobs: | ||
update: | ||
if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Find default branch name | ||
id: defaultBranch | ||
shell: bash | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
run: | | ||
default_branch=$(gh repo view --json defaultBranchRef --jq .defaultBranchRef.name) | ||
printf "::set-output name=defaultBranch::%s\n" "${default_branch}" | ||
printf "defaultBranchRef.name=%s\n" "${default_branch}" | ||
- name: Update readme | ||
shell: bash | ||
id: update | ||
env: | ||
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | ||
DEF: "${{ steps.defaultBranch.outputs.defaultBranch }}" | ||
run: | | ||
make init | ||
make readme/build | ||
# Ignore changes if they are only whitespace | ||
if ! git diff --quiet README.md && git diff --ignore-all-space --ignore-blank-lines --quiet README.md; then | ||
git restore README.md | ||
echo Ignoring whitespace-only changes in README | ||
fi | ||
- name: Create Pull Request | ||
# This action will not create or change a pull request if there are no changes to make. | ||
# If a PR of the auto-update/readme branch is open, this action will just update it, not create a new PR. | ||
uses: cloudposse/actions/github/[email protected] | ||
with: | ||
token: ${{ secrets.PUBLIC_REPO_ACCESS_TOKEN }} | ||
commit-message: Update README.md and docs | ||
title: Update README.md and docs | ||
body: |- | ||
## what | ||
This is an auto-generated PR that updates the README.md and docs | ||
## why | ||
To have most recent changes of README.md and doc from origin templates | ||
branch: auto-update/readme | ||
base: ${{ steps.defaultBranch.outputs.defaultBranch }} | ||
delete-branch: true | ||
labels: | | ||
auto-update | ||
no-release | ||
readme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters