mirror of https://github.com/Bunsly/JobSpy
yml matches dynamic output
parent
e22e4cc092
commit
0a5c5fa9b3
|
@ -32,6 +32,7 @@ permissions:
|
||||||
jobs:
|
jobs:
|
||||||
scrape_jobs:
|
scrape_jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -46,28 +47,25 @@ jobs:
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install -r requirements.txt
|
pip install -r requirements.txt
|
||||||
|
|
||||||
- name: Set environment variables
|
- name: Write user-specific config.json
|
||||||
run: |
|
run: |
|
||||||
echo "USER_EMAIL=${{ github.event.inputs.user_email }}" >> $GITHUB_ENV
|
echo "{
|
||||||
echo "SEARCH_TERMS=${{ github.event.inputs.search_terms }}" >> $GITHUB_ENV
|
\"user_email\": \"${{ github.event.inputs.user_email }}\",
|
||||||
echo "RESULTS_WANTED=${{ github.event.inputs.results_wanted }}" >> $GITHUB_ENV
|
\"search_terms\": [\"${{ github.event.inputs.search_terms }}\"],
|
||||||
echo "MAX_DAYS_OLD=${{ github.event.inputs.max_days_old }}" >> $GITHUB_ENV
|
\"results_wanted\": ${{ github.event.inputs.results_wanted }},
|
||||||
echo "TARGET_STATE=${{ github.event.inputs.target_state }}" >> $GITHUB_ENV
|
\"max_days_old\": ${{ github.event.inputs.max_days_old }},
|
||||||
|
\"target_state\": \"${{ github.event.inputs.target_state }}\"
|
||||||
|
}" > config.json
|
||||||
|
|
||||||
- name: Run JobSpy Scraper Dynamic
|
- name: Run JobSpy Scraper Dynamic
|
||||||
run: python job_scraper_dynamic.py
|
run: python job_scraper_dynamic.py
|
||||||
|
|
||||||
- name: Verify jobspy_output_dynamic.csv exists
|
- name: Upload user-specific CSV as artifact
|
||||||
run: |
|
|
||||||
if [ ! -f jobspy_output_dynamic.csv ]; then
|
|
||||||
echo "❌ ERROR: jobspy_output_dynamic.csv not found!"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "✅ jobspy_output_dynamic.csv found."
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Upload JobSpy Output as Artifact
|
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: jobspy-results-dynamic
|
name: jobspy-output-${{ github.event.inputs.user_email }}
|
||||||
path: jobspy_output_dynamic.csv
|
path: |
|
||||||
|
jobspy_output_dynamic_${{ github.event.inputs.user_email }}
|
||||||
|
.replace('@','_at_')
|
||||||
|
.replace('.','_')
|
||||||
|
.csv
|
||||||
|
|
Loading…
Reference in New Issue