From d0455a817e56a68fc6b0b205812efa7760c150a5 Mon Sep 17 00:00:00 2001 From: Lyon Till <158992+ljtill@users.noreply.github.com> Date: Thu, 18 Mar 2021 23:01:58 +0000 Subject: [PATCH] Update .github/ (#42) --- .github/workflows/pull.yml | 2 +- .github/workflows/push.yml | 19 ++++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/.github/workflows/pull.yml b/.github/workflows/pull.yml index e63fb3f..f530094 100644 --- a/.github/workflows/pull.yml +++ b/.github/workflows/pull.yml @@ -187,7 +187,7 @@ jobs: # # Merge - # Update remote refs along with associated objects + # Automatically merge the head branch into base # - name: 'Merge' diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index c3e69a2..4650449 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -20,6 +20,7 @@ on: env: strict_mode: false + auto_merge: true jobs: @@ -76,7 +77,7 @@ jobs: Install-Module @module -Force -Verbose } shell: pwsh - if: env.strict_mode == true + if: env.strict_mode == 'true' # # Connect @@ -88,7 +89,7 @@ jobs: $credential = New-Object PSCredential -ArgumentList $env:ARM_CLIENT_ID, (ConvertTo-SecureString -String $env:ARM_CLIENT_SECRET -AsPlainText -Force) Connect-AzAccount -TenantId $env:ARM_TENANT_ID -ServicePrincipal -Credential $credential -SubscriptionId $env:ARM_SUBSCRIPTION_ID shell: pwsh - if: env.strict_mode == true + if: env.strict_mode == 'true' # # Initialize @@ -101,7 +102,7 @@ jobs: Initialize-AzOpsRepository -Rebuild Get-Job | Remove-Job -Force shell: pwsh - if: env.strict_mode == true + if: env.strict_mode == 'true' # # Issue @@ -231,6 +232,7 @@ jobs: ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }} ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }} ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: @@ -338,3 +340,14 @@ jobs: run: | git push origin ${{ github.head_ref }} shell: bash + + # + # Merge + # Automatically merge the Pull Request into base + # + + - name: 'Merge' + run: | + gh pr merge ${{ github.event.pull_request.head.ref }} --squash --delete-branch + shell: bash + if: env.auto_merge == 'true'