catalog/.github/workflows/test.yaml

40 lines
1.2 KiB
YAML
Raw Normal View History

2022-09-22 08:04:38 -04:00
name: Sync multiple branches
2022-09-22 08:07:38 -04:00
concurrency: catalog-test
2022-09-22 08:04:38 -04:00
on:
push:
branches:
- 'staging'
workflow_dispatch:
2022-11-24 04:27:59 -05:00
2022-09-22 08:04:38 -04:00
jobs:
test-and-sync:
name: Test and Sync SCALE Catalog
runs-on: ubuntu-latest
container:
2022-11-24 04:51:24 -05:00
image: ghcr.io/truecharts/devcontainer:v3.1.1@sha256:b682ca20989c13c4afc8edf0660f83ce8e896e32db21d6321ba06f135911fc81
2022-09-22 08:04:38 -04:00
steps:
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
name: Checkout
- name: catalog tests
run: |
echo "Starting Catalog Validation"
2022-09-22 08:14:35 -04:00
/usr/local/bin/catalog_validate validate --path "${PWD}"
2022-11-24 04:27:59 -05:00
- name: catalog json generation
run: |
echo "Starting Catalog json Generation"
2022-11-24 06:51:31 -05:00
/usr/local/bin/catalog_update update --path "${PWD}"
2022-11-24 04:27:59 -05:00
2022-09-22 08:38:29 -04:00
- name: Merge staging into main
2022-09-22 08:34:58 -04:00
run: |
2022-11-24 07:46:21 -05:00
cd "/__w/catalog/catalog/"
2022-11-24 07:16:21 -05: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 08:10:07 -05:00
git status
2022-11-24 07:16:52 -05:00
git commit --all -m "Commit catalog.json" || echo "Commiting catalog.json failed"
2022-11-24 04:27:59 -05:00
git push -f origin staging:main