File tree Expand file tree Collapse file tree 5 files changed +57
-56
lines changed Expand file tree Collapse file tree 5 files changed +57
-56
lines changed Original file line number Diff line number Diff line change @@ -79,6 +79,7 @@ sudo mkdir -p /etc/buildkit
7979CONFIG_PATH=" /etc/buildkit/buildkitd.toml"
8080
8181TMP_CONFIG=$( mktemp)
82+ sudo chmod 644 " $TMP_CONFIG "
8283cat << EOF > "$TMP_CONFIG "
8384[worker.oci]
8485 enabled = true
@@ -90,7 +91,6 @@ cat <<EOF > "$TMP_CONFIG"
9091 defaultKeepStorage = "$KEEP_HUMAN "
9192 [[gc.policy]]
9293 keepDuration = "720h" # 30 days
93- keepBytes = "$KEEP_BYTES "
9494 filters = ["type==regular"]
9595EOF
9696
Original file line number Diff line number Diff line change 11name : Example Workflow
22
33on :
4- push :
5- branches :
6- - main
7- pull_request :
8- branches :
9- - main
4+ workflow_run :
5+ workflows : ["PR Permission Gate"]
6+ types :
7+ - completed
108
119permissions :
1210 contents : read
1311
1412jobs :
15- gatekeeper :
13+ pre-commit :
14+ if : ${{ github.event.workflow_run.conclusion == 'success' }}
1615 runs-on : ubuntu-latest
1716 steps :
1817 - uses : actions/checkout@v5
19- - uses : astral-sh/ruff-action@v3
20- - run : ruff check --line-length 100 .
21- - uses : ./.github/actions/pr-permission-gate
18+ - uses : actions/setup-python@v6
19+ with :
20+ python-version : " 3.12"
21+ - uses : pre-commit/action@v3.0.1
22+ with :
23+ extra_args : --all-files
2224
2325 example-on-default-runner :
24- needs : [gatekeeper ]
26+ needs : [pre-commit ]
2527 runs-on :
2628 - codebuild-runner-${{ github.run_id }}-${{ github.run_attempt }}
2729 steps :
4547 fleet:x86-g6xl-runner
4648 steps :
4749 - uses : actions/checkout@v5
48- - uses : ./.github/actions/pr-permission-gate
49- with :
50- required-level : admin
5150 - run : .github/scripts/runner_setup.sh
5251 - run : |
5352 nvidia-smi
5958 fleet:x86-g6xl-runner
6059 steps :
6160 - uses : actions/checkout@v5
62- - uses : ./.github/actions/pr-permission-gate
63- with :
64- required-level : admin
6561 - run : .github/scripts/runner_setup.sh
6662 - run : |
6763 nvidia-smi
Original file line number Diff line number Diff line change 1+ name : PR Permission Gate
2+ on :
3+ pull_request_target :
4+ branches : [main]
5+ types : [opened, reopened, synchronize]
6+
7+ permissions :
8+ contents : read
9+ pull-requests : read
10+
11+ concurrency :
12+ group : pr-gate-${{ github.event.pull_request.number }}
13+ cancel-in-progress : true
14+
15+ jobs :
16+ gatekeeper :
17+ name : gatekeeper
18+ runs-on : ubuntu-latest
19+ steps :
20+ - name : Checkout base branch (safe)
21+ uses : actions/checkout@v5
22+ with :
23+ # checkout the workflow's commit (base branch), not the PR head
24+ ref : ${{ github.event.pull_request.base.sha }}
25+ fetch-depth : 1
26+
27+ - name : Run permission gate (from base)
28+ uses : ./.github/actions/pr-permission-gate
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -7,19 +7,21 @@ default_stages:
77 - manual
88
99repos :
10- # - repo: https://github.com/reteps/dockerfmt
11- # # run `pre-commit autoupdate` to pin the version
12- # rev: main
13- # hooks:
14- # - id: dockerfmt
15- # args:
16- # # optional: add additional arguments here
17- # - --indent=2
18- # - --write
19- # - repo: https://github.com/rhysd/actionlint
20- # rev: v1.7.7
21- # hooks:
22- # - id: actionlint
10+ - repo : https://github.com/reteps/dockerfmt
11+ # run `pre-commit autoupdate` to pin the version
12+ rev : main
13+ hooks :
14+ - id : dockerfmt
15+ args :
16+ # optional: add additional arguments here
17+ - --indent=2
18+ - --write
19+ stages : [manual] # run in CI
20+ - repo : https://github.com/rhysd/actionlint
21+ rev : v1.7.7
22+ hooks :
23+ - id : actionlint
24+ stages : [manual] # run in CI
2325 - repo : https://github.com/scop/pre-commit-shfmt
2426 rev : v3.12.0-2 # Use the latest stable revision
2527 hooks :
You can’t perform that action at this time.
0 commit comments