2022-03-30 08:29:49 +00:00
|
|
|
name: "Pull Request: Validate"
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.head_ref }}-pr-validate
|
|
|
|
# cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
2023-05-25 08:56:29 +00:00
|
|
|
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
|
2023-08-24 15:23:11 +00:00
|
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
2023-05-25 08:56:29 +00:00
|
|
|
|
|
|
|
- name: Collect changes
|
|
|
|
id: collect-changes
|
|
|
|
uses: ./.github/actions/collect-changes
|
2022-03-30 08:35:37 +00:00
|
|
|
|
2022-03-30 08:29:49 +00:00
|
|
|
charts-lint:
|
2022-03-30 08:51:01 +00:00
|
|
|
uses: ./.github/workflows/charts-lint.yaml
|
2022-03-30 08:35:37 +00:00
|
|
|
needs:
|
2023-05-25 08:56:29 +00:00
|
|
|
- pr-changes
|
2022-03-30 08:29:49 +00:00
|
|
|
with:
|
|
|
|
checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }}
|
2023-05-25 08:56:29 +00:00
|
|
|
chartChangesDetected: ${{ needs.pr-changes.outputs.addedOrModified }}
|
2023-05-28 17:28:55 +00:00
|
|
|
modifiedFiles: ${{ needs.pr-changes.outputs.addedOrModifiedFiles }}
|
|
|
|
modifiedCharts: ${{ needs.pr-changes.outputs.addedOrModifiedCharts }}
|
2022-03-30 08:29:49 +00:00
|
|
|
charts-test:
|
2022-03-30 08:51:01 +00:00
|
|
|
uses: ./.github/workflows/charts-test.yaml
|
2022-03-30 08:29:49 +00:00
|
|
|
needs:
|
2023-05-25 08:56:29 +00:00
|
|
|
- pr-changes
|
2022-03-30 08:29:49 +00:00
|
|
|
- charts-lint
|
|
|
|
with:
|
|
|
|
checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }}
|
2023-05-25 08:56:29 +00:00
|
|
|
chartChangesDetected: ${{ needs.pr-changes.outputs.addedOrModified }}
|
2023-05-28 17:28:55 +00:00
|
|
|
modifiedCharts: ${{ needs.pr-changes.outputs.addedOrModifiedCharts }}
|
2022-03-30 10:26:37 +00:00
|
|
|
|
|
|
|
catalog-test:
|
|
|
|
uses: ./.github/workflows/catalog-test.yaml
|
|
|
|
needs:
|
2023-05-25 08:56:29 +00:00
|
|
|
- pr-changes
|
2022-03-30 10:26:37 +00:00
|
|
|
with:
|
|
|
|
checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }}
|
2023-05-25 08:56:29 +00:00
|
|
|
chartChangesDetected: ${{ needs.pr-changes.outputs.addedOrModified }}
|
2022-11-14 21:30:05 +00:00
|
|
|
|
|
|
|
print_head_msg:
|
|
|
|
name: print commit message
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
outputs:
|
|
|
|
head-commit-message: ${{ steps.get_head_commit_message.outputs.headCommitMsg }}
|
|
|
|
steps:
|
|
|
|
- name: Get repo
|
2023-08-24 15:23:11 +00:00
|
|
|
uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3
|
2022-11-14 21:30:05 +00:00
|
|
|
with:
|
|
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
2022-11-15 10:36:31 +00:00
|
|
|
- name: verbose head git commit message
|
|
|
|
run: echo "$(git show -s --format=%s)"
|
2022-11-14 21:30:05 +00:00
|
|
|
- name: Print head git commit message
|
|
|
|
id: get_head_commit_message
|
|
|
|
run: echo "::set-output name=headCommitMsg::$(git show -s --format=%s)"
|
|
|
|
|
2023-02-06 17:29:56 +00:00
|
|
|
automerge-and-approve:
|
2022-11-14 21:30:05 +00:00
|
|
|
needs:
|
2023-05-25 08:56:29 +00:00
|
|
|
- pr-changes
|
2022-11-14 21:30:05 +00:00
|
|
|
- catalog-test
|
|
|
|
- charts-test
|
|
|
|
- charts-lint
|
|
|
|
- print_head_msg
|
2023-01-17 23:06:10 +00:00
|
|
|
if: needs.print_head_msg.outputs.head-commit-message == 'Commit bumped Chart Version'
|
2023-02-06 17:29:56 +00:00
|
|
|
name: Automerge and Approve build
|
2022-11-14 21:30:05 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-02-06 17:29:56 +00:00
|
|
|
- uses: hmarr/auto-approve-action@v3
|
|
|
|
with:
|
2023-02-06 17:42:27 +00:00
|
|
|
github-token: "${{ secrets.PERS_PAT }}"
|
2022-11-14 21:30:05 +00:00
|
|
|
- name: automerge
|
2023-02-21 22:11:08 +00:00
|
|
|
uses: pascalgn/automerge-action@22948e0bc22f0aa673800da838595a3e7347e584 # v0.15.6
|
2022-11-14 21:30:05 +00:00
|
|
|
env:
|
|
|
|
GITHUB_TOKEN: "${{ secrets.BOT_TOKEN }}"
|
|
|
|
UPDATE_RETRIES: 12
|
|
|
|
UPDATE_RETRY_SLEEP: 60000
|
2023-04-29 13:25:22 +00:00
|
|
|
MERGE_METHOD: squash
|