-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (89 loc) · 3.31 KB
/
Copy pathuipath-deploy.yml
File metadata and controls
99 lines (89 loc) · 3.31 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
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
name: UiPath Deploy
# Controls when the workflow will run
on:
# Triggers the workflow on call from other repository
workflow_call:
inputs:
environment:
required: true
type: string
tag:
required: true
type: string
projectFilePaths:
required: false
type: string
orchestratorUrl:
required: true
type: string
orchestratorFolder:
required: true
type: string
orchestratorTenant:
type: string
orchestratorApplicationScope:
type: string
organizationId:
type: string
secrets:
orchestratorApplicationId:
required: true
orchestratorApplicationSecret:
required: true
jobs:
pack:
# The type of runner that the job will run on
runs-on: windows-latest
environment: ${{ inputs.environment }}
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: Mikael-RnD/setup-uipath@v1
- id: pack
uses: Mikael-RnD/UiPath-Pack@v1
with:
projectFilePaths: ${{ inputs.projectFilePaths }}
orchestratorUrl: ${{ inputs.orchestratorUrl }}
orchestratorTenant: ${{ inputs.organizationId }}
orchestratorFolder: ${{ inputs.orchestratorFolder }}
orchestratorApplicationId: ${{ secrets.orchestratorApplicationId }}
orchestratorApplicationSecret: ${{ secrets.orchestratorApplicationSecret }}
orchestratorApplicationScope: ${{ inputs.orchestratorApplicationScope }}
orchestratorLogicalName: ${{ inputs.organizationId }}
projectVersion: ${{ inputs.tag }}
# Upload packages as build artifacts to be handled by deploy job
- uses: actions/upload-artifact@v3
with:
name: ${{ inputs.environment }}-packages
path: ${{ steps.pack.outputs.packagesPath }}
if-no-files-found: error
retention-days: 90
deploy:
needs: pack
environment: ${{ inputs.environment }}
runs-on: windows-latest
steps:
# Download .nupkg packages created in build job to GitHub workspace
- name: Download a Build Artifact
uses: actions/download-artifact@v3
with:
# Artifact name
name: ${{ inputs.environment }}-packages
# Destination path
path: ${{github.workspace}}
# The UiPath CLI is installed on Runner
- uses: Mikael-RnD/setup-uipath@v1
# .nupkg packages are deployed to UiPath Orchestrator
- name: UiPath Deploy
uses: Mikael-RnD/UiPath-Deploy@v1
with:
packagesPath: ${{ github.workspace }}
orchestratorUrl: ${{ inputs.orchestratorUrl }}
orchestratorTenant: ${{ inputs.orchestratorTenant }}
orchestratorFolder: ${{ inputs.orchestratorFolder }}
orchestratorApplicationId: ${{ secrets.orchestratorApplicationId }}
orchestratorApplicationSecret: ${{ secrets.orchestratorApplicationSecret }}
orchestratorApplicationScope: ${{ inputs.orchestratorApplicationScope }}
orchestratorLogicalName: ${{ inputs.organizationId }}