Skip to content

Commit

Permalink
keywords - 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ric-evans authored Nov 15, 2024
1 parent dde7f6d commit 97b5f26
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,16 @@ runs:
shell: bash


- name: Prepare Keywords
if: env.IS_GIT_BEHIND != 'true'
run: |
CLEANED_KEYWORDS="${{ inputs.keywords }}"
# Wrap each line in quotes if not already quoted, then replace newlines with spaces
CLEANED_KEYWORDS=$(echo "$CLEANED_KEYWORDS" | sed 's/^[^"].*[^"]$/"&"/' | tr '\n' ' ')
echo "$CLEANED_KEYWORDS"
echo "CLEANED_KEYWORDS=$CLEANED_KEYWORDS" >> $GITHUB_ENV
shell: bash

- name: Build pyproject.toml + README.md (and commit)
if: env.IS_GIT_BEHIND != 'true'
run: |
Expand All @@ -155,7 +165,7 @@ runs:
--github-full-repo $GITHUB_REPOSITORY \
--token ${{ github.token }} \
--python-min "${{ inputs.python_min }}" \
--keywords ${{ inputs.keywords | replace('\n', ' ') }} \
--keywords $CLEANED_KEYWORDS \
--python-max "${{ inputs.python_max }}" \
--package-dirs ${{ inputs.package_dirs }} \
--exclude-dirs ${{ inputs.exclude_dirs }} \
Expand Down

0 comments on commit 97b5f26

Please sign in to comment.