This commit is contained in:
Tingluo Huang
2023-09-18 01:13:38 +00:00
commit 7751908620
45 changed files with 3072 additions and 0 deletions

38
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,38 @@
name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request: {}
schedule:
- cron: '0 0 * * 0'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure global git auth
run: git config --global http.https://github.com/.extraheader "$(git config --local http.https://github.com/.extraheader)"
- name: Build
run: ./script/build.sh
- name: Verify no unstaged changes
run: ./script/verify-no-unstaged-changes.sh
publish:
if: github.event_name != 'pull_request'
needs: [build]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build
run: |
./script/build.sh
echo ${{ github.sha }} > ./_layout/SHA1

29
.github/workflows/update.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Update
on:
workflow_dispatch:
schedule:
- cron: "0 5 * * 1" # 5 AM UTC on Monday
jobs:
update:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure global git auth
run: |
git config --global http.https://github.com/.extraheader "$(git config --local http.https://github.com/.extraheader)"
git config --local --unset http.https://github.com/.extraheader
- name: Update actions
run: ./script/update-action.sh --all
- name: Create pull request
run: ./script/create-pull-request.sh
env:
GITHUB_TOKEN: ${{ github.token }}