Skip to content

Commit

Permalink
Fix: Broken metadata capture action (#147)
Browse files Browse the repository at this point in the history
Signed-off-by: Matthew Watkins <[email protected]>
  • Loading branch information
ModeSevenIndustrialSolutions authored Aug 1, 2024
1 parent df95757 commit 5a79194
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
22 changes: 13 additions & 9 deletions .github/actions/workflow-capture-metadata/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ outputs:
REPOSITORY:
description: "Returns the name of the GitHub repository"
value: ${{ steps.github.outputs.repository }}
TAGGED:
description: "Set true if semantic tags are present"
value: ${{ steps.github.outputs.tagged }}
TAG-TRIGGER:
description: "Set true if semantic tags were an event/trigger"
value: ${{ steps.github.outputs.tag-trigger }}

runs:
using: "composite"
Expand All @@ -24,17 +24,19 @@ runs:
shell: bash
run: |
# GitHub Repository Metadata
TAGGED="false"
echo "tagged=${TAGGED}" >> $GITHUB_OUTPUT
TAG-TRIGGER="false"
echo "tag-trigger=${TAG-TRIGGER}" >> $GITHUB_OUTPUT
echo ### Repository Data ###
echo "GitHub Owner: $GITHUB_REPOSITORY_OWNER"
echo "owner=${GITHUB_REPOSITORY_OWNER}" >> "$GITHUB_OUTPUT"
REPOSITORY=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}
echo "GitHub Repository: ${REPOSITORY}"
echo "repository=${REPOSITORY}" >> "$GITHUB_OUTPUT"
if [ ! -z "$GITHUB_TRIGGERING_ACTOR" ]; then
echo "Action/workflow trigger: $GITHUB_TRIGGERING_ACTOR [GITHUB_TRIGGERING_ACTOR]"
echo "### User Data ###
echo "User responsible: $GITHUB_TRIGGERING_ACTOR [GITHUB_TRIGGERING_ACTOR]"
fi
echo "### Action/Workflow Environment ###"
if [ ! -z "$GITHUB_REF" ]; then
Expand All @@ -49,7 +51,7 @@ runs:
if [ ! -z "$GITHUB_REF_NAME" ]; then
echo "GITHUB_REF_NAME: $GITHUB_REF_NAME"
if [[ "$GITHUB_REF_NAME" =~ ^v[0-9]+\.[0-9]+ ]]; then
echo "tagged=${TAGGED}" >> $GITHUB_OUTPUT
echo "tag-trigger=${TAG-TRIGGER}" >> $GITHUB_OUTPUT
fi
fi
if [ ! -z "$GITHUB_REF_TYPE" ]; then
Expand All @@ -58,4 +60,6 @@ runs:
if [ ! -z "$GITHUB_EVENT_NAME" ]; then
echo "GITHUB_EVENT_NAME: $GITHUB_EVENT_NAME"
fi
echo "GitHub event contained tags: $TAGGED"
echo "### Derived Data ###
echo "GitHub event/triggered by tags: $TAG-TRIGGER"
2 changes: 1 addition & 1 deletion .github/workflows/actions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
### Test Individual Composite Actions ###

test:
name: "Synthetic Tests"
name: "Standalone Synthetic Tests"
runs-on: ubuntu-latest
if: github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch'
steps:
Expand Down

0 comments on commit 5a79194

Please sign in to comment.