Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@ permissions:

jobs:
github-action:
uses: cloudposse/.github/.github/workflows/shared-release-branches.yml@main
uses: cloudposse-github-actions/.github/.github/workflows/shared-release-branches.yml@main
secrets: inherit
32 changes: 26 additions & 6 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,13 +90,17 @@ inputs:
description: "The title to use when creating a Pull Request (when commit_method: pr)"

pr_labels:
description: "Whitespace-separated list of labels to apply to Pull Requests (when commit_method: pr)"
description: "Whitespace-separated list of labels to apply to Pull Requests (when commit_method: pr or ( commit_method: commit and github context is a PR) ))"
required: false
default: |
auto-update
no-release
readme

sign-commits:
description: 'Sign commits for `pr` commit_method as `github-actions[bot]` when using `GITHUB_TOKEN`, or your own bot when using GitHub App tokens.'
default: 'false'

atmos-version:
description: The version of atmos to install
required: false
Expand All @@ -109,7 +113,10 @@ outputs:
readme_file:
description: "Generated README file path (if readme_enabled: true)"
value: "${{ steps.readme.outputs.file }}"


changes_detected:
description: "Changes detected"
value: "${{ steps.auto-commit.outputs.changes_detected || steps.auto-pr.outputs.pull-request-number != false }}"
runs:
using: "composite"
steps:
Expand Down Expand Up @@ -238,7 +245,7 @@ runs:
- uses: gaurav-nelson/github-action-markdown-link-check@v1
if: inputs.readme_enabled == 'true' && inputs.validate_readme == 'true'
with:
file-path: ${{ steps.readme.outputs.file }}
file-path: '${{ steps.readme.outputs.file }} **/README.md'
check-modified-files-only: true
max-depth: 0

Expand All @@ -255,7 +262,19 @@ runs:
commit_author: "${{ inputs.commit_author }}"
file_pattern: '${{ steps.banner.outputs.file }} ${{ steps.readme.outputs.file }}'
push_options: '${{ inputs.commit_push_options }}'


- uses: actions/github-script@v7
if: steps.auto-commit.outputs.changes_detected == 'true' && inputs.commit_method == 'commit' && github.event_name == 'pull_request'
with:
script: |
labels = '${{ inputs.pr_labels }}'.split(' ')
await github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: labels
})

- name: Add Image to Step Summary
if: steps.auto-commit.outputs.changes_detected == 'true' && inputs.banner_enabled == 'true' && inputs.commit_method == 'commit'
shell: bash
Expand All @@ -272,18 +291,19 @@ runs:

- name: Create Pull Request
if: inputs.commit_method == 'pr'
uses: peter-evans/create-pull-request@v6
uses: peter-evans/create-pull-request@v7
id: auto-pr
with:
title: ${{ inputs.pr_title }}
author: ${{ inputs.commit_author }}
commit-message: ${{ inputs.commit_message }}
committer: ${{ inputs.commit_author }}
sign-commits: ${{ inputs.sign-commits }}
add-paths: |
${{ steps.banner.outputs.file }}
${{ steps.readme.outputs.file }}
**/README.md
docs/*

body: |-
## what
This is an auto-generated PR that updates the README.md and docs
Expand Down