FreeTube/.github/workflows/autoMerge.yml

24 lines
906 B
YAML
Raw Normal View History

2021-08-20 03:18:15 +02:00
name: Auto Merge PR
2021-08-19 23:28:39 +02:00
# Controls when the workflow will run
on:
2021-08-20 03:18:15 +02:00
# Triggers the workflow on push or pull request events but only for the development branch
2021-08-20 04:05:47 +02:00
pull_request:
types: [opened, synchronize, reopened]
2021-08-19 23:28:39 +02:00
2021-08-20 03:18:15 +02:00
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2021-08-19 23:28:39 +02:00
jobs:
2021-08-20 03:18:15 +02:00
# This workflow contains a single job called "build"
2021-08-19 23:28:39 +02:00
build:
# The type of runner that the job will run on
2021-08-20 05:04:35 +02:00
runs-on: ubuntu-18.04
2021-08-19 23:28:39 +02:00
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
2021-08-20 04:55:56 +02:00
- uses: actions/checkout@v2
2021-08-20 04:44:07 +02:00
- name: Enable Auto Merge
2021-08-20 04:50:54 +02:00
env:
GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
2021-08-20 04:23:53 +02:00
run: |
2021-08-20 04:57:03 +02:00
echo ${{ secrets.PUSH_TOKEN }} >> auth.txt && gh auth login --with-token < auth.txt && rm auth.txt && gh pr merge https://github.com/FreeTubeApp/FreeTube/pull/${{ github.event.pull_request.number }} --auto