Skip to content

Merge pull request #4 from Vel0ra/update-version #7

Merge pull request #4 from Vel0ra/update-version

Merge pull request #4 from Vel0ra/update-version #7

Workflow file for this run

name: ruiching-sdk-index
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v3
with:
python-version: 3.10.12
- name: Install Python Dependencies
run: |
python -m pip install --upgrade pip
pip install requests urllib3
- name: Check Script Existence
id: check_merge_sdk_script
run: |
if [ -f "$GITHUB_WORKSPACE/scripts/merge_sdk.py" ]; then
echo "script_exists=true" >> $GITHUB_ENV
else
echo "script_exists=false" >> $GITHUB_ENV
fi
- name: Update-Github-Sdk-Index
if: ${{ github.repository == 'RT-Thread-Studio/ruiching-sdk-index' && github.ref == 'refs/heads/main' && github.event_name == 'push' && env.script_exists == 'true' }}
run: |
cd ${{ github.workspace }}/scripts
python merge_sdk.py
- name: Check Packages Mirror Script Existence
id: check_packages_mirror_script
run: |
if [ -f "$GITHUB_WORKSPACE/scripts/packages_mirror.py" ]; then
echo "script_exists=true" >> $GITHUB_ENV
else
echo "script_exists=false" >> $GITHUB_ENV
fi
- name: Update-Gogs-Packages-Mirror
if: ${{ github.repository == 'RT-Thread-Studio/ruiching-sdk-index' && github.ref == 'refs/heads/main' && github.event_name == 'push' && env.script_exists == 'true' }}
env:
GOGS_URL: ${{ secrets.GOGS_URL }}
GOGS_TOKEN: ${{ secrets.GOGS_TOKEN }}
GITHUB_PROXY_URL: ${{ secrets._GITHUB_PROXY_URL }}
run: |
cd ${{ github.workspace }}/scripts
python packages_mirror.py