Skip to content

Commit

Permalink
Merge pull request #796 from Mindful-AI-Assistants/FabianaCampanari-p…
Browse files Browse the repository at this point in the history
…atch-1

Create sync.yml
  • Loading branch information
FabianaCampanari authored Sep 30, 2024
2 parents d499e4c + 4147f97 commit 8307554
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Synapse Workspace Sync (Synapse Workspace Sync Automation)

on:
workflow_dispatch:
inputs:
environment:
type: environment
default: synapse-preprod

permissions:
id-token: write
repository-projects: write
contents: write
statuses: write
deployments: write
actions: write

jobs:
sync:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- name: Checkout OEA Repository
uses: actions/checkout@v4
- name: OIDC Login to Azure Public Cloud with AzPowershell (enableAzPSSession true)
uses: azure/login@v2
with:
client-id: ${{ secrets.AZURE_CLIENT_ID }}
tenant-id: ${{ secrets.AZURE_TENANT_ID }}
subscription-id: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
enable-AzPSSession: true
- run: |
git checkout -b ${{ vars.SYNC_BRANCH_NAME }}
- shell: pwsh
run: |
.github/workflows/scripts/synapse/sync.ps1 ${{ vars.WORKSPACE_NAME }} ${{ vars.RESOURCE_GROUP }}
- run: |
git config --global user.name ${{ github.actor }}
git config --global user.email github-actions[bot]@.noreply.github.com
git commit -am "Syncing with ${{ inputs.environment }}."
git push --set-upstream origin ${{ vars.SYNC_BRANCH_NAME }}

0 comments on commit 8307554

Please sign in to comment.