create a workflow for auto merge prs and a Dockerfile #1
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
name: Auto Merge PRs | |
on: | |
pull_request: | |
types: [opened, synchronize, reopened] | |
jobs: | |
test-and-merge: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v2 | |
- name: Set up Go | |
uses: actions/setup-go@v2 | |
with: | |
go-version: '^1.18.1' | |
- name: Test | |
run: go test ./... | |
- name: Merge PR | |
if: github.event.pull_request.mergeable_state == 'clean' | |
uses: pascalgn/[email protected] | |
with: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
MERGE_LABELS: "auto-merge,approved" # Specify your labels here | |
MERGE_METHOD: "squash" # Choose merge method: merge, squash or rebase | |
MERGE_RETRIES: "3" | |
MERGE_RETRY_SLEEP: "10000" | |
MERGE_REMOVE_LABELS: "auto-merge,approved" |