mirror of https://github.com/Bunsly/JobSpy
50 lines
1.4 KiB
YAML
50 lines
1.4 KiB
YAML
name: JobSpy Scraper Dynamic Workflow
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
user_email:
|
|
description: 'Email of user'
|
|
required: true
|
|
default: 'Branden@autoemployme.onmicrosoft.com'
|
|
|
|
permissions:
|
|
contents: read
|
|
id-token: write
|
|
|
|
jobs:
|
|
scrape_jobs:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Repo
|
|
uses: actions/checkout@v3
|
|
|
|
- name: Set Up Python
|
|
uses: actions/setup-python@v4
|
|
with:
|
|
python-version: '3.10'
|
|
|
|
- name: Install Dependencies
|
|
run: |
|
|
pip install --upgrade pip
|
|
pip install -r requirements.txt
|
|
|
|
- name: Sanitize Email + Create Run ID
|
|
id: vars
|
|
run: |
|
|
safe_email=$(echo "${{ github.event.inputs.user_email }}" | sed 's/@/_at_/g; s/\./_/g')
|
|
run_id=$(date +%s)
|
|
echo "safe_email=$safe_email" >> $GITHUB_OUTPUT
|
|
echo "run_id=$run_id" >> $GITHUB_OUTPUT
|
|
|
|
- name: Run Job Scraper
|
|
run: |
|
|
python job_scraper_dynamic.py "${{ github.event.inputs.user_email }}" "${{ steps.vars.outputs.run_id }}"
|
|
|
|
- name: Upload Output Artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: jobspy_output_${{ steps.vars.outputs.safe_email }}_${{ steps.vars.outputs.run_id }}
|
|
path: outputs/jobspy_output_${{ steps.vars.outputs.safe_email }}_${{ steps.vars.outputs.run_id }}.csv
|