-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
39 lines (38 loc) · 967 Bytes
/
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
name: 'Set shared envs'
description: 'Set app name from repo and release version'
author: 'emvakar'
branding:
icon: 'bell'
color: blue
inputs:
repository_owner:
description: 'Repository owner'
required: true
commit_ref:
description: 'Commit reference'
required: true
runs:
using: 'composite'
steps:
- name: Set App Name
run: |
str=${{ github.repository }}
find="${{ inputs.repository_owner }}/"
replace=""
result=${str//$find/$replace}
echo "FOLDER_NAME=${result}" >> $GITHUB_ENV
shell: bash
- name: Setup Release version for app
run: |
env
str="${{ inputs.commit_ref }}"
find="release/"
replace=""
result=${str//$find/$replace}
echo ${result}
find="refs/heads/"
replace=""
result=${result//$find/$replace}
echo ${result}
echo "APP_VERSION=${result}" >> $GITHUB_ENV
shell: bash