sync-labs-to-feishu-full #495
This file contains hidden or 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: sync-labs-to-feishu-full | |
on: | |
schedule: | |
- cron: "20 18 * * *" | |
workflow_dispatch: | |
jobs: | |
sync: | |
if: github.repository_owner == 'labex-labs' | |
runs-on: ubuntu-latest | |
timeout-minutes: 60 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.10" | |
- name: Install CLI | |
run: | | |
rm -rf /tmp/labex-cli | |
git clone --depth=1 https://${{ secrets.GH_TOKEN }}@github.com/labex-labs/labex-cli.git /tmp/labex-cli | |
cd /tmp/labex-cli | |
pip install --editable . | |
- name: Sync to Feishu | |
env: | |
APP_ID: ${{ secrets.APP_ID }} | |
APP_SECRET: ${{ secrets.APP_SECRET }} | |
LABEX_USERNAME: ${{ secrets.LABEX_USERNAME }} | |
LABEX_PASSWORD: ${{ secrets.LABEX_PASSWORD }} | |
run: | | |
labex login --username $LABEX_USERNAME --password $LABEX_PASSWORD --check false | |
labex sync lab-to-feishu --appid "$APP_ID" --appsecret "$APP_SECRET" --sync-lab-info true --check-update-hours 36 |