Skip to content

GitHub Actions

github-actions edited this page Jun 23, 2021 · 16 revisions

In this guide


Portal

Create the repository

Browse to the AzOps Accelerator, and select Use this template

Create the repository from the template

Select whether the owner will be an organization or user and provide a repository name.

We'd recommended creating the new repository as private.

There is no need to include all branches as all latest stable changes reside within the main branch.

Configure the repository

Configure the secrets

Navigate to settings on the newly created repository, select the Secrets section.

Create the following repository secrets:

Configure the repository secrets

Select the Options sections, untick Merge commits and Rebase merging.

Configure the merge types


Scripts

Create the repository from the pre-defined template

gh repo create '<Name>' --template azure/azops-accelerator --private --confirm

Add the repository secrets

gh secret set 'ARM_TENANT_ID' -b "<Secret>"
gh secret set 'ARM_SUBSCRIPTION_ID' -b "<Secret>"
gh secret set 'ARM_CLIENT_ID' -b "<Secret>"
gh secret set 'ARM_CLIENT_SECRET' -b "<Secret>"

Disable Allow Merge commits and Allow rebase merging

gh api -X PATCH /repos/{owner}/{repo} -f allow_rebase_merge=false
gh api -X PATCH /repos/{owner}/{repo} -f allow_merge_commit=false

Initiaite the first Pull workflow

gh api -X POST /repos/{owner}/{repo}/dispatches -f event_type='Enterprise-Scale Deployment'