Skip to content
This repository has been archived by the owner on Oct 5, 2023. It is now read-only.

Merge pull request #249 from Azure/bryanzab/US29807 #164

Merge pull request #249 from Azure/bryanzab/US29807

Merge pull request #249 from Azure/bryanzab/US29807 #164

name: Convert Policy Definitions from BICEP to ARM
permissions: write-all
on:
push:
branches:
- "main"
workflow_dispatch: {}
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/[email protected]
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Set env.DATE environment variable
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: Create new branch
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
with:
branch: "arm-conversion-${{ env.DATE }}"
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run Bicep build
uses: aliencube/[email protected]
with:
files: "src/resources/Microsoft.Authorization/policyDefinitions/*.bicep"
- name: Commit & Push
uses: actions-js/push@master
with:
github_token: ${{ steps.generate_token.outputs.token }}
branch: "arm-conversion-${{ env.DATE }}"
force: true
message: "BICEP to ARM automatic conversion by Github Actions - update-${{ env.DATE }}"
- name: Pull request
uses: devops-infra/[email protected]
with:
github_token: ${{ steps.generate_token.outputs.token }}
source_branch: "arm-conversion-${{ env.DATE }}"
target_branch: main
title: "BICEP to ARM automatic conversion by Github Actions - update-${{ env.DATE }}"