TrueChartsClone/.github/workflows/pr-metadata.yaml

61 lines
2.1 KiB
YAML
Raw Normal View History

name: "Pull Request: Get metadata"
on:
workflow_call:
outputs:
isRenovatePR:
description: "Is the PR coming from Renovate?"
value: ${{ jobs.pr-metadata.outputs.isRenovatePR }}
isFork:
description: "Is the PR coming from a forked repo?"
value: ${{ jobs.pr-metadata.outputs.isFork }}
addedOrModified:
description: "Does the PR contain any changes?"
value: ${{ jobs.pr-changes.outputs.addedOrModified }}
addedOrModifiedFiles:
description: "A list of the files changed in this PR"
value: ${{ jobs.pr-changes.outputs.addedOrModifiedFiles }}
addedOrModifiedCharts:
description: "A list of the charts changed in this PR"
value: ${{ jobs.pr-changes.outputs.addedOrModifiedCharts }}
jobs:
pr-metadata:
name: Collect PR metadata
runs-on: ubuntu-latest
outputs:
isRenovatePR: ${{ startsWith(steps.branch-name.outputs.current_branch, 'renovate/') }}
isFork: ${{ github.event.pull_request.head.repo.full_name != github.repository }}
steps:
- name: Get branch name
id: branch-name
chore(deps): update tj-actions/branch-names action to v6.5 (#7891) This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [tj-actions/branch-names](https://togithub.com/tj-actions/branch-names) | action | minor | `v6.4` -> `v6.5` | --- ### ⚠ Dependency Lookup Warnings ⚠ Warnings were logged while processing this repo. Please check the Dependency Dashboard for more information. --- ### Release Notes <details> <summary>tj-actions/branch-names</summary> ### [`v6.5`](https://togithub.com/tj-actions/branch-names/releases/tag/v6.5) [Compare Source](https://togithub.com/tj-actions/branch-names/compare/v6.4...v6.5) #### What's Changed - Upgraded to v6.4 by [@&#8203;jackton1](https://togithub.com/jackton1) in [https://github.com/tj-actions/branch-names/pull/205](https://togithub.com/tj-actions/branch-names/pull/205) - Update tj-actions/github-changelog-generator action to v1.17 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/206](https://togithub.com/tj-actions/branch-names/pull/206) - Update tj-actions/auto-doc action to v1.7.1 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/207](https://togithub.com/tj-actions/branch-names/pull/207) - Update tj-actions/auto-doc action to v1.7.2 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/209](https://togithub.com/tj-actions/branch-names/pull/209) - Updated README.md by [@&#8203;jackton1](https://togithub.com/jackton1) in [https://github.com/tj-actions/branch-names/pull/208](https://togithub.com/tj-actions/branch-names/pull/208) - Bump tj-actions/auto-doc from 1.7.1 to 1.7.2 by [@&#8203;dependabot](https://togithub.com/dependabot) in [https://github.com/tj-actions/branch-names/pull/210](https://togithub.com/tj-actions/branch-names/pull/210) - Update tj-actions/auto-doc action to v1.7.3 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/211](https://togithub.com/tj-actions/branch-names/pull/211) - Update actions/checkout action to v3.3.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/212](https://togithub.com/tj-actions/branch-names/pull/212) - Updated README.md by [@&#8203;jackton1](https://togithub.com/jackton1) in [https://github.com/tj-actions/branch-names/pull/213](https://togithub.com/tj-actions/branch-names/pull/213) - Update pascalgn/automerge-action action to v0.15.6 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/214](https://togithub.com/tj-actions/branch-names/pull/214) - Update codacy/codacy-analysis-cli-action action to v4.3.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/215](https://togithub.com/tj-actions/branch-names/pull/215) - Update tj-actions/github-changelog-generator action to v1.18 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/217](https://togithub.com/tj-actions/branch-names/pull/217) - Updated README.md by [@&#8203;jackton1](https://togithub.com/jackton1) in [https://github.com/tj-actions/branch-names/pull/218](https://togithub.com/tj-actions/branch-names/pull/218) - Update tj-actions/release-tagger action to v3 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/219](https://togithub.com/tj-actions/branch-names/pull/219) - Update peter-evans/create-pull-request action to v4.2.4 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/220](https://togithub.com/tj-actions/branch-names/pull/220) - Update actions/checkout action to v3.4.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/221](https://togithub.com/tj-actions/branch-names/pull/221) - Update tj-actions/verify-changed-files action to v14 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/222](https://togithub.com/tj-actions/branch-names/pull/222) - Update actions/checkout action to v3.5.0 by [@&#8203;renovate](https://togithub.com/renovate) in [https://github.com/tj-actions/branch-names/pull/223](https://togithub.com/tj-actions/branch-names/pull/223) - feat: Update sync-release-version.yml to use git-cliff by [@&#8203;jackton1](https://togithub.com/jackton1) in [https://github.com/tj-actions/branch-names/pull/225](https://togithub.com/tj-actions/branch-names/pull/225) **Full Changelog**: https://github.com/tj-actions/branch-names/compare/v6...v6.5 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://togithub.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNC4xNTMuMSIsInVwZGF0ZWRJblZlciI6IjM0LjE1My4xIn0=-->
2023-04-07 08:06:18 +00:00
uses: tj-actions/branch-names@2e5354c6733793113f416314375826df030ada23 # v6.5
- name: Save PR data to file
env:
PR_NUMBER: ${{ github.event.number }}
run: |
echo $PR_NUMBER > pr_number.txt
- name: Store pr data in artifact
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
with:
name: pr_metadata
path: ./pr_number.txt
retention-days: 5
pr-changes:
name: Collect PR changes
runs-on: ubuntu-latest
outputs:
addedOrModified: ${{ steps.collect-changes.outputs.changesDetected }}
addedOrModifiedFiles: ${{ steps.collect-changes.outputs.addedOrModifiedFiles }}
addedOrModifiedCharts: ${{ steps.collect-changes.outputs.addedOrModifiedCharts }}
steps:
- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab # v3
- name: Collect changes
id: collect-changes
uses: ./.github/actions/collect-changes