-
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #796 from Mindful-AI-Assistants/FabianaCampanari-p…
…atch-1 Create sync.yml
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} | ||