Add base #6
Workflow file for this run
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
name: Consolidate YAML Files | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
consolidate_yaml: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Consolidate YAML files | |
uses: mikefarah/yq@v4 | |
with: | |
cmd: yq eval-all '. as $item ireduce ([]; . + [$item])' websites/*.yaml > websites.yaml | |
- name: Upload websites.yaml as artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
path: websites.yaml | |
- name: Commit and push consolidated file | |
if: github.ref == 'refs/heads/main' | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: "Auto-update websites.yaml" | |
file_pattern: websites.yaml |