91 lines
2.6 KiB
YAML
91 lines
2.6 KiB
YAML
name: "Pull Request: Validate"
|
|
|
|
on:
|
|
pull_request:
|
|
|
|
concurrency:
|
|
group: ${{ github.head_ref }}-pr-validate
|
|
# cancel-in-progress: true
|
|
|
|
jobs:
|
|
pr-metadata:
|
|
uses: ./.github/workflows/pr-metadata.yaml
|
|
|
|
pre-commit-check:
|
|
uses: truecharts/.github/.github/workflows/pre-commit-check.yaml@main
|
|
needs:
|
|
- pr-metadata
|
|
with:
|
|
modifiedFiles: ${{ needs.pr-metadata.outputs.addedOrModifiedFiles }}
|
|
|
|
#charts-changelog:
|
|
# uses: ./.github/workflows/charts-changelog.yaml
|
|
# needs:
|
|
# - pr-metadata
|
|
# - pre-commit-check
|
|
# with:
|
|
# isRenovatePR: ${{ needs.pr-metadata.outputs.isRenovatePR }}
|
|
# modifiedCharts: ${{ needs.pr-metadata.outputs.addedOrModifiedCharts }}
|
|
|
|
charts-lint:
|
|
uses: ./.github/workflows/charts-lint.yaml
|
|
needs:
|
|
- pr-metadata
|
|
# - charts-changelog
|
|
with:
|
|
checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }}
|
|
chartChangesDetected: ${{ needs.pr-metadata.outputs.addedOrModified }}
|
|
|
|
charts-test:
|
|
uses: ./.github/workflows/charts-test.yaml
|
|
needs:
|
|
- pr-metadata
|
|
# - charts-changelog
|
|
- charts-lint
|
|
with:
|
|
checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }}
|
|
chartChangesDetected: ${{ needs.pr-metadata.outputs.addedOrModified }}
|
|
|
|
catalog-test:
|
|
uses: ./.github/workflows/catalog-test.yaml
|
|
needs:
|
|
- pr-metadata
|
|
# - charts-changelog
|
|
with:
|
|
checkoutCommit: ${{ needs.charts-changelog.outputs.commitHash }}
|
|
chartChangesDetected: ${{ needs.pr-metadata.outputs.addedOrModified }}
|
|
|
|
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
|
|
uses: actions/checkout@755da8c3cf115ac066823e79a1e1788f8940201b # v3
|
|
with:
|
|
ref: ${{ github.event.pull_request.head.sha }}
|
|
- name: verbose head git commit message
|
|
run: echo "$(git show -s --format=%s)"
|
|
- name: Print head git commit message
|
|
id: get_head_commit_message
|
|
run: echo "::set-output name=headCommitMsg::$(git show -s --format=%s)"
|
|
|
|
automerge:
|
|
needs:
|
|
- pr-metadata
|
|
- catalog-test
|
|
- charts-test
|
|
- charts-lint
|
|
- print_head_msg
|
|
if: needs.print_head_msg.outputs.head-commit-message == 'Commit bumped Chart Version'
|
|
name: Automerge build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: automerge
|
|
uses: pascalgn/automerge-action@eb68b061739cb9d81564f8e812d0b3c45f0fb09a # tag=v0.15.5
|
|
env:
|
|
GITHUB_TOKEN: "${{ secrets.BOT_TOKEN }}"
|
|
UPDATE_RETRIES: 12
|
|
UPDATE_RETRY_SLEEP: 60000
|