68 lines
2.0 KiB
YAML
68 lines
2.0 KiB
YAML
name: Sync multiple branches
|
|
|
|
concurrency: catalog-test
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 'staging'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
test-and-sync:
|
|
name: Test and Sync SCALE Catalog
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
|
name: Checkout-validate
|
|
with:
|
|
fetch-depth: 1
|
|
repository: truecharts/catalog_validation
|
|
token: ${{ secrets.BOT_TOKEN }}
|
|
path: catalog_validation
|
|
- name: install catalog_validation
|
|
run:
|
|
# apt-get update \
|
|
# && \
|
|
# apt-get -y install --no-install-recommends \
|
|
# python3-pip \
|
|
# python3-setuptools \
|
|
# debhelper-compat \
|
|
# dh-python \
|
|
# python3-dev \
|
|
# devscripts \
|
|
# python3-jsonschema \
|
|
# python3-semantic-version \
|
|
# python3-kubernetes \
|
|
# python3-yaml \
|
|
# python3-venv \
|
|
# && \
|
|
cd /catalog_validation
|
|
pip install -r requirements.txt
|
|
pip install -U --no-cache-dir .
|
|
cd -
|
|
- uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # tag=v3
|
|
name: Checkout
|
|
with:
|
|
token: ${{ secrets.BOT_TOKEN }}
|
|
|
|
- name: catalog tests
|
|
run: |
|
|
echo "Starting Catalog Validation"
|
|
/usr/local/bin/catalog_validate validate --path "${PWD}"
|
|
|
|
- name: catalog json generation
|
|
run: |
|
|
echo "Starting Catalog json Generation"
|
|
/usr/local/bin/catalog_update update --path "${PWD}"
|
|
|
|
- name: Merge staging into main
|
|
run: |
|
|
cd "/__w/catalog/catalog/"
|
|
git config user.name "TrueCharts-Bot"
|
|
git config user.email "bot@truecharts.org"
|
|
# git add catalog.json || echo "Adding catalog.json failed"
|
|
git status
|
|
git commit --all -m "Commit catalog.json" || echo "Commiting catalog.json failed"
|
|
git push -f origin staging:main
|