Skip to content

schedule to update oos templates #164

schedule to update oos templates

schedule to update oos templates #164

name: schedule to update oos templates
on:
push:
schedule:
- cron: '0 0 * * 0'
jobs:
update-oos-templates:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7]
steps:
- name: Install dependencies
run: |
sudo apt install jq -y
- uses: jerray/setup-aliyun-cli-action@v1.0.1
with:
aliyun-cli-version: '3.0.99'
mode: AK
access-key-id: ${{ secrets.ALIYUN_ACCESS_KEY_ID }}
access-key-secret: ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }}
region: ${{ secrets.ALIYUN_REGION }}
- name: Checkout codes
uses: actions/checkout@v1
- name: Update oos templates
run: ./sync-templates.sh
- name: Commit updated files
run: |
git config --local user.email "davidzheng23@gmail.com"
git config --local user.name "Zheng Dayu"
git add .
git commit -m "Github actions auto update oos templates"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}