-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
auto enable auto merge on PRs (#973)
* auto enable auto merge on PRs * lint
- Loading branch information
Showing
1 changed file
with
57 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
name: auto_merge | ||
|
||
on: | ||
pull_request: | ||
branches: [main] | ||
types: | ||
- opened | ||
- reopened | ||
|
||
jobs: | ||
auto_merge: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Print contexts | ||
env: | ||
GITHUB_CONTEXT: ${{ toJson(github) }} | ||
ENV_CONTEXT: ${{ toJson(env) }} | ||
VARS_CONTEXT: ${{ toJson(vars) }} | ||
JOB_CONTEXT: ${{ toJson(job) }} | ||
STEPS_CONTEXT: ${{ toJson(steps) }} | ||
RUNNER_CONTEXT: ${{ toJson(runner) }} | ||
SECRETS_CONTEXT: ${{ toJson(secrets) }} | ||
STRATEGY_CONTEXT: ${{ toJson(strategy) }} | ||
MATRIX_CONTEXT: ${{ toJson(matrix) }} | ||
NEEDS_CONTEXT: ${{ toJson(needs) }} | ||
INPUTS_CONTEXT: ${{ toJson(inputs) }} | ||
run: | | ||
echo "******************************" | ||
echo "github:" "$GITHUB_CONTEXT" | ||
echo "******************************" | ||
echo "env:" "$ENV_CONTEXT" | ||
echo "******************************" | ||
echo "vars:" "$VARS_CONTEXT" | ||
echo "******************************" | ||
echo "job:" "$JOB_CONTEXT" | ||
echo "******************************" | ||
echo "steps:" "$STEPS_CONTEXT" | ||
echo "******************************" | ||
echo "runner:" "$RUNNER_CONTEXT" | ||
echo "******************************" | ||
echo "secrets:" "$SECRETS_CONTEXT" | ||
echo "******************************" | ||
echo "strategy:" "$STRATEGY_CONTEXT" | ||
echo "******************************" | ||
echo "matrix:" "$MATRIX_CONTEXT" | ||
echo "******************************" | ||
echo "needs:" "$NEEDS_CONTEXT" | ||
echo "******************************" | ||
echo "inputs:" "$INPUTS_CONTEXT" | ||
echo "******************************" | ||
- name: Enable auto-merge on PR | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
echo "Enabling auto-merge on PR" | ||
gh pr merge ${{ github.event.number }} --auto --squash |