Skip to content

Commit

Permalink
cleanup name override handling
Browse files Browse the repository at this point in the history
  • Loading branch information
tmclaugh committed Sep 4, 2024
1 parent acac015 commit 2c6ab94
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ inputs:
artifact_name_override:
description: Override name of artifact to use
required: false
default: ''

runs:
using: composite
Expand All @@ -21,11 +20,13 @@ runs:
- name: Set artifact name
id: set-artifact-name
shell: bash
env:
ARTIFACT_NAME: ${{ inputs.artifact_name_override }}
run: |
if [ '${{ inputs.artifact_name_override }}' != '' ]; then
name="${{ inputs.artifact_name_override }}";
else
if [ -z "${ARTIFACT_NAME}" ]; then
name="${{ env.GITHUB_REPOSITORY_SLUG }}-${{ env.GITHUB_REF_SLUG_URL }}-${{ github.run_number }}-${{ github.sha }}";
else
name="${{ inputs.artifact_name_override }}";
fi;
echo "artifact-name=$name" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 2c6ab94

Please sign in to comment.