Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/workflows/code-freeze.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Code Freeze

# This repository is a read-only mirror. Its contents are synced one-way by an
# internal Databricks GitHub App. Direct pull requests are not accepted.
#
# This check only reports pass/fail. It blocks merges only once it is added as a
# required status check on the `main` ruleset. The sync apps are bypass actors
# on that ruleset, so their automated syncs are unaffected.

on:
pull_request:
types: [opened, reopened, synchronize, ready_for_review]
merge_group:

permissions: {}

jobs:
code-freeze:
name: code-freeze
runs-on:
group: databricks-protected-runner-group
labels: linux-ubuntu-latest
steps:
- name: Reject pull requests not from the sync bots
if: github.event_name == 'pull_request'
env:
PR_AUTHOR: ${{ github.event.pull_request.user.login }}
run: |
case "$PR_AUTHOR" in
'databricks-ci-ghec-1[bot]' | 'databricks-ci-ghec-2[bot]')
echo "Author '$PR_AUTHOR' is a sync bot. Allowing."
exit 0
;;
esac
echo "::error::This repository is a read-only mirror and is frozen."
echo "::error::Direct pull requests are not accepted."
exit 1
Loading