-
-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.3 KB
/
sync.yml
File metadata and controls
41 lines (38 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
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@v6
- 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 }}