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: Check and Publish | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
name: Check | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
- name: Setup virtual env | |
working-directory: tool | |
run: | | |
python -m venv .venv | |
. ./.venv/bin/activate | |
pip install -r requirements.txt | |
- name: Run check | |
run: | | |
. ./tool/.venv/bin/activate | |
./tool/check.py | |
publish: | |
if: ${{ github.ref == 'refs/heads/main' }} | |
needs: | |
- check | |
runs-on: [self-hosted, banner] | |
name: Publish | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
- name: Setup virtual env | |
working-directory: tool | |
run: | | |
python -m venv .venv | |
. ./.venv/bin/activate | |
pip install -r requirements.txt | |
- name: Run publish | |
run: | | |
. ./tool/.venv/bin/activate | |
./tool/update-products-yml.py |