Skip to content

Commit

Permalink
target-rev
Browse files Browse the repository at this point in the history
  • Loading branch information
yordanovsstoyan committed Jul 24, 2024
1 parent 56566ef commit 9370a9c
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions actions/substitute-envs/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,23 @@ outputs:
runs:
using: "composite"
steps:
- name: Get branch name
id: branch-name
shell: bash
run: |
if [[ "$BRANCH_NAME" == "main" ]] || [[ "$BRANCH_NAME" == "master" ]]; then
echo "branch=HEAD" >> "$GITHUB_OUTPUT"
else
echo "branch=$BRANCH_NAME" >> "$GITHUB_OUTPUT"
fi
env:
BRANCH_NAME: "${{ github.ref_name }}"

- name: Substitute envs
id: substitute
shell: bash
env:
TARGET_REVISION: "${{ steps.branch-name.outputs.branch }}"
run: |
function substitute() {
# create (sub-)directories
Expand Down

0 comments on commit 9370a9c

Please sign in to comment.