2022-09-22 12:04:38 +00:00
|
|
|
name: Sync multiple branches
|
2022-09-22 12:07:38 +00:00
|
|
|
|
|
|
|
concurrency: catalog-test
|
|
|
|
|
2022-09-22 12:04:38 +00:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- 'staging'
|
|
|
|
workflow_dispatch:
|
2022-11-24 09:27:59 +00:00
|
|
|
|
2022-09-22 12:04:38 +00:00
|
|
|
jobs:
|
|
|
|
test-and-sync:
|
|
|
|
name: Test and Sync SCALE Catalog
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-11-24 13:15:08 +00:00
|
|
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
|
|
|
name: Checkout-validate
|
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
|
|
|
repository: truecharts/catalog_validation
|
|
|
|
token: ${{ secrets.BOT_TOKEN }}
|
2022-11-24 13:22:02 +00:00
|
|
|
path: catalog_validation
|
2022-11-24 13:20:00 +00:00
|
|
|
|
2022-11-24 13:15:08 +00:00
|
|
|
- name: install catalog_validation
|
2022-11-24 13:23:49 +00:00
|
|
|
shell: bash
|
|
|
|
run: |
|
2022-11-24 13:22:02 +00:00
|
|
|
cd catalog_validation
|
2022-11-24 13:15:08 +00:00
|
|
|
pip install -r requirements.txt
|
|
|
|
pip install -U --no-cache-dir .
|
|
|
|
cd -
|
2022-11-24 13:20:00 +00:00
|
|
|
|
2022-09-22 12:04:38 +00:00
|
|
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
|
|
|
name: Checkout
|
2022-11-24 13:15:08 +00:00
|
|
|
with:
|
|
|
|
token: ${{ secrets.BOT_TOKEN }}
|
2022-09-22 12:04:38 +00:00
|
|
|
|
|
|
|
- name: catalog tests
|
2022-11-24 13:23:49 +00:00
|
|
|
shell: bash
|
2022-09-22 12:04:38 +00:00
|
|
|
run: |
|
|
|
|
echo "Starting Catalog Validation"
|
2022-09-22 12:14:35 +00:00
|
|
|
/usr/local/bin/catalog_validate validate --path "${PWD}"
|
2022-11-24 09:27:59 +00:00
|
|
|
|
|
|
|
- name: catalog json generation
|
2022-11-24 13:23:49 +00:00
|
|
|
shell: bash
|
2022-11-24 09:27:59 +00:00
|
|
|
run: |
|
|
|
|
echo "Starting Catalog json Generation"
|
2022-11-24 11:51:31 +00:00
|
|
|
/usr/local/bin/catalog_update update --path "${PWD}"
|
2022-11-24 09:27:59 +00:00
|
|
|
|
2022-09-22 12:38:29 +00:00
|
|
|
- name: Merge staging into main
|
2022-11-24 13:23:49 +00:00
|
|
|
shell: bash
|
2022-09-22 12:34:58 +00:00
|
|
|
run: |
|
2022-11-24 12:46:21 +00:00
|
|
|
cd "/__w/catalog/catalog/"
|
2022-11-24 12:16:21 +00:00
|
|
|
git config user.name "TrueCharts-Bot"
|
|
|
|
git config user.email "bot@truecharts.org"
|
|
|
|
# git add catalog.json || echo "Adding catalog.json failed"
|
2022-11-24 13:10:07 +00:00
|
|
|
git status
|
2022-11-24 12:16:52 +00:00
|
|
|
git commit --all -m "Commit catalog.json" || echo "Commiting catalog.json failed"
|
2022-11-24 09:27:59 +00:00
|
|
|
git push -f origin staging:main
|