-
Notifications
You must be signed in to change notification settings - Fork 0
/
action.yml
62 lines (57 loc) · 2.11 KB
/
action.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
name: 'Upload to JFrog'
description: 'Upload build artefacts to JFrog general registry.'
inputs:
access_token:
description: 'Access token for JFrog service account. Find it in org secrets.'
user_name:
description: 'Define release tag.'
registry_url:
description: 'Define release repository.'
artefacts_patterns:
description: 'Define patterns for files which are going to be uploaded - pytyhon regex.'
default: '*'
action_shell:
description: 'Define shell for running python script'
default: 'bash'
action_path:
description: 'Define action path'
default: ${{ github.action_path }}
runs:
using: "composite"
steps:
- uses: actions/setup-python@v4
if: |
runner.environment == 'github-hosted' ||
inputs.action_shell == 'powershell'
with:
python-version: '3.11'
- name: 'Install python deps for Windows'
if: inputs.action_shell == 'powershell'
run: python3 -m pip install requests ndg-httpsclient pyopenssl pyasn1
shell: ${{ inputs.action_shell }}
- name: 'Install python deps'
if: inputs.action_shell == 'bash'
run: python3 -m pip install requests pyopenssl
shell: ${{ inputs.action_shell }}
- name: 'Upload artefacts'
if: inputs.action_shell == 'bash'
run: |
python3 ${ACTION_PATH}/artefacts2jfrog.py
shell: ${{ inputs.action_shell }}
env:
ARTEFACTS_PATTERNS: ${{ inputs.artefacts_patterns }}
REGISTRY_URL: ${{ inputs.registry_url }}
ACCESS_TOKEN: ${{ inputs.access_token }}
SERVICE_ACCOUNT: ${{ inputs.user_name }}
ACTION_PATH: ${{ inputs.action_path || github.action_path }}
- name: 'Upload artefacts'
if: inputs.action_shell == 'powershell'
run: |
python3 $env:ACTION_PATH\artefacts2jfrog.py
shell: ${{ inputs.action_shell }}
env:
ARTEFACTS_PATTERNS: ${{ inputs.artefacts_patterns }}
REGISTRY_URL: ${{ inputs.registry_url }}
ACCESS_TOKEN: ${{ inputs.access_token }}
SERVICE_ACCOUNT: ${{ inputs.user_name }}
ACTION_PATH: ${{ inputs.action_path || github.action_path }}