From d80202c791e2de85c07aa4a0de249d70c1b857e0 Mon Sep 17 00:00:00 2001 From: David Refoua Date: Sun, 23 Apr 2023 23:39:35 +0330 Subject: [PATCH] add task to auto push to development --- .github/workflows/branches.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/branches.yml diff --git a/.github/workflows/branches.yml b/.github/workflows/branches.yml new file mode 100644 index 0000000..e850479 --- /dev/null +++ b/.github/workflows/branches.yml @@ -0,0 +1,31 @@ +name: Update branches + +# Controls when the action will run. +on: + # Triggers the workflow on push events for the development branch + push: + branches: [ master ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This job updates the development branch with the master branch + update-development: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it + - uses: actions/checkout@v3 + + # Runs a single command using the runners shell + - name: Merge master into development + run: | + git config user.name "${{ github.actor }}" + git config user.email "${{ github.actor }}@users.noreply.github.com" + git checkout development + git merge --no-ff master + git push origin development