12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- name: Github-Action-Test
- # 一次只运行一个job
- concurrency:
- group: ${{ github.workflow }}-${{ github.ref }}
- cancel-in-progress: true
- on:
- push:
- branches: [master]
- tags:
- - v*
- # v1.2.1
- on:
- pull_request:
- # 新建一个PR时
- types: [create, synchronize, update]
- #
- branches: [feature/**]
- #
- paths:
- - ".github/workflows/test.yaml"
- - "src/api"
- on:
- schedule:
- # 每天凌晨 8:30 执行
- cron: "30 8 * * *"
- jobs:
- # 构建名称
- build:
- runs-on: ubuntu-latest
- with:
- working_directory: flutter_news_example/api
- analyze_directories: "routes lib test"
- coverage_excludes: "**/*.g.dart"
- report_on: "routes,lib"
- steps:
- - uses: actions/checkout@v4
- # 输出环境变量
- - run: echo $CI
- - run: echo $GITHUB_REPOSITORY
- - run: echo $GITHUB_EVENT_NAME
- - run: echo $GITHUB_SHA
- - run: echo $GITHUB_REF_NAME
- - run: echo $GITHUB_HEAD_REF
- - name: Dump GitHub context
- run: echo '${{ toJSON(github) }}'
-
- - name: Delete Workflow Runs
- uses: Mattraks/delete-workflow-runs@main
- with:
- retain_days: 90
- keep_minimum_runs: 6
|