mirror of
https://github.com/microsoft/autogen.git
synced 2026-01-23 08:28:35 -05:00
* test permissions * test least permissions * remove contents permissions * testing permisions * Update deploy-website.yml permission block --------- Co-authored-by: Davor Runje <davor@airt.ai> Co-authored-by: Eric Zhu <ekzhu@users.noreply.github.com> Co-authored-by: Chi Wang <wang.chi@microsoft.com>
31 lines
811 B
YAML
31 lines
811 B
YAML
name: Code formatting
|
|
|
|
# see: https://help.github.com/en/actions/reference/events-that-trigger-workflows
|
|
on: # Trigger the workflow on pull request or merge
|
|
pull_request:
|
|
merge_group:
|
|
types: [checks_requested]
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
permissions: {}
|
|
# actions: read
|
|
# checks: read
|
|
# contents: read
|
|
# deployments: read
|
|
jobs:
|
|
|
|
pre-commit-check:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-python@v4
|
|
- name: Set $PY environment variable
|
|
run: echo "PY=$(python -VV | sha256sum | cut -d' ' -f1)" >> $GITHUB_ENV
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ~/.cache/pre-commit
|
|
key: pre-commit|${{ env.PY }}|${{ hashFiles('.pre-commit-config.yaml') }}
|
|
- uses: pre-commit/action@v3.0.0
|