-
Notifications
You must be signed in to change notification settings - Fork 1
102 lines (100 loc) · 3.52 KB
/
powerplatform-api-connector.yml
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
on:
push:
branches:
- main
paths-ignore:
- csdl
- powerplatform
workflow_dispatch:
inputs:
api-endpoint:
default: https://api.flow.microsoft.com
description: ''
environment:
default: '~default'
description: ''
api-connector-list:
required: true
default: >
["shared_logicflows"]
description: ''
api-version:
required: false
description: ''
permissions:
id-token: write
contents: write
pull-requests: write
jobs:
powerplatform-api-connector:
strategy:
matrix:
api-connector: ${{ fromJson(inputs.api-connector-list || '["shared_logicflows"]') }}
name: >
${{ matrix.api-connector }}: Power Platform API Connector
runs-on: ubuntu-latest
env:
branch-name: powerplatform-api-fetcher/${{ matrix.api-connector }}
steps:
- id: rate-limit
name: Check GitHub API rate limit
uses: thnetii/.github/actions/gh-actions-ratelimit-check@main
- name: Wait until GitHub API rate limit reset
if: fromJson(steps.rate-limit.outputs.remaining) < 50
uses: thnetii/.github/actions/gh-actions-sleep-until@main
with:
datetime: ${{ steps.rate-limit.outputs.reset }}
- name: Chekout ${{ github.repository }}@${{ github.ref }}
uses: actions/checkout@v4
with:
fetch-depth: 180
submodules: true
- name: Git configure comitter identity
uses: thnetii/.github/actions/git-user-config@main
- id: checkout-pr-branch
name: Swich to new branch for possible PR
uses: thnetii/.github/actions/create-rebase-pr-branch@main
with:
branch-name: ${{ env.branch-name }}
- uses: actions/setup-node@v4
with:
node-version: 20.x
- id: npm-clean-install-actions
name: Install NPM package dependencies for Github actions
uses: thnetii/.github/actions/gh-actions-npm@main
with:
arguments: |
clean-install
--workspace=.github/actions/powerplatform-api-connector-download
--omit=dev
--install-links
--no-audit
--no-fund
- id: msidp-workflow-auth
name: Authenticate GitHub Actions Workflow
uses: thnetii/.github/actions/ms-idp-workflow-run-auth@main
with:
tenant-id: ${{ secrets.MSIDP_TENANTID }}
client-id: ${{ secrets.MSIDP_CLIENTID }}
resource: https://service.flow.microsoft.com/
- id: download-api-connector
name: 'Download Power Platform API Connector'
uses: ./.github/actions/powerplatform-api-connector-download
with:
access-token: ${{ steps.msidp-workflow-auth.outputs.access-token }}
api-endpoint: ${{ inputs.api-endpoint }}
environment: ${{ inputs.environment }}
api-connector: ${{ matrix.api-connector }}
api-version: ${{ inputs.api-version }}
- id: commit
name: Commit and push (if any changes)
uses: ./.github/actions/commit-push
with:
branch-name: ${{ env.branch-name }}
commit-message: Power Platform API Connector ${{ matrix.api-connector }}, ${{ fromJson(steps.download-api-connector.outputs.properties).metadata.version.current }}
- id: merge
name: Merge into ${{ github.ref || github.sha }}
if: fromJSON(steps.commit.outputs.committed)
uses: ./.github/actions/merge-branch
with:
branch-name: ${{ env.branch-name }}