Skip to content

Commit

Permalink
add shared action
Browse files Browse the repository at this point in the history
  • Loading branch information
emvakar committed Feb 14, 2024
0 parents commit 05e3825
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions set-shared-envs-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: 'Set shared envs'
description: 'Set app name from repo and release version'
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
- name: Setup Release version for app
run: |
env
str="${{ inputs.commit_ref }}"
find="release/"
replace=""
result=${str//$find/$replace}
echo ${result}
echo "APP_VERSION=${result}" >> $GITHUB_ENV

0 comments on commit 05e3825

Please sign in to comment.