Skip to content

Commit

Permalink
Get the path dynamically
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Nov 25, 2024
1 parent bc9c62d commit fe0cdab
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ runs:
# Inject environment variables
- if: inputs.env-site-name != ''
run: |
bash print-deprecation-warning.sh "env-site-name" "env: SITE_NAME=value"
bash print-deprecation-warning.sh "env-site-name" "env: SITE_NAME=value" "$GITHUB_WORKFLOW"
echo "SITE_NAME=${{ inputs.env-site-name }}" >> .env
shell: bash
- if: inputs.env-site-url != ''
run: |
bash print-deprecation-warning.sh "env-site-url" "env: SITE_URL=value"
bash print-deprecation-warning.sh "env-site-url" "env: SITE_URL=value" "$GITHUB_WORKFLOW"
echo "SITE_URL=${{ inputs.env-site-url }}" >> .env
shell: bash
- if: inputs.env-torchlight-token != ''
run: |
bash print-deprecation-warning.sh "env-torchlight-token" "env: TORCHLIGHT_TOKEN=value"
bash print-deprecation-warning.sh "env-torchlight-token" "env: TORCHLIGHT_TOKEN=value" "$GITHUB_WORKFLOW"
echo "TORCHLIGHT_TOKEN=${{ inputs.env-torchlight-token }}" >> .env
shell: bash

Expand Down
7 changes: 4 additions & 3 deletions print-deprecation-warning.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
#!/bin/bash

# Usage: print-deprecation-warning.sh "old_input" "new_input"
# Example: print-deprecation-warning.sh "env-site-name" "env: SITE_NAME=value"
# Usage: print-deprecation-warning.sh "old_input" "new_input" "workflow_file"
# Example: print-deprecation-warning.sh "env-site-name" "env: SITE_NAME=value" ".github/workflows/build.yml"

old_input=$1
new_input=$2
workflow_file=$3

echo "::warning file=.github/workflows/build.yml,title=Deprecation Notice::The '$old_input' input is deprecated and will be removed in \`hydephp/action\` v2.0. Please use '$new_input' instead. See https://github.com/hydephp/action/pull/46 for more information."
echo "::warning file=$workflow_file,title=Deprecation Notice::The '$old_input' input is deprecated and will be removed in \`hydephp/action\` v2.0. Please use '$new_input' instead. See https://github.com/hydephp/action/pull/46"

0 comments on commit fe0cdab

Please sign in to comment.