-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (43 loc) · 1.39 KB
/
actions.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Scrape and push
on:
schedule:
- cron: "0 0 * * *"
# runs daily at midnight
workflow_dispatch:
env:
EMAIL: ${{ secrets.EMAIL }}
NAME: ${{ secrets.NAME }}
jobs:
report:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- name: install dependencies
run: pip install -r requirements.txt
- name: Scrape all jobs
run: python3 scrape-all-jobs.py
shell: bash
- name: Save Time
run: |
echo "TIME=$(TZ=America/Los_Angeles date +'%m/%d/%Y %H:%M %Z')" >> $GITHUB_ENV
# echo "time2=$(date +"%Y-%m-%d")" >> $GITHUB_ENV
- name: Check if there are any changes
id: verify_diff
run: |
git diff --quiet . || echo "changed=true" >> $GITHUB_OUTPUT
- name: Commit files
if: steps.verify_diff.outputs.changed == 'true'
run: |
git config --local user.email ${{ env.EMAIL }}
git config --local user.name ${{ env.NAME }}
git commit -a -m "adding new jobs on ${{ env.TIME }}"
- name: GitHub Push
uses: ad-m/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: main
# - run: echo "🍏 This job's status is ${{ job.status }}."