Skip to content

Commit

Permalink
Merge pull request #665 from USRSE/add/jobs-bot-more-metadata
Browse files Browse the repository at this point in the history
Adding support for job parser with more metadata (name and location)
  • Loading branch information
vsoch committed Jan 27, 2022
2 parents 015f2e3 + 6ae4587 commit 193d8cd
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 6 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/jobs-poster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,17 @@ jobs:

- id: updater
name: Job Updater
uses: rseng/jobs-updater@main
uses: rseng/jobs-updater@add/multiple-metadata-fields
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
with:
filename: "_data/jobs.yml"
key: "url"

# Fields to include (all but url will have title before)
keys: "name,location,url"

# Field to determine job uniqueness
unique: "url"

deploy: true
test: false
Expand All @@ -36,9 +41,9 @@ jobs:
twitter_consumer_key: ${{ secrets.TWITTER_CONSUMER_API_KEY }}

- run: echo ${{ steps.updater.outputs.fields }}
name: Show New Jobs
name: Show Fields Used
shell: bash

- run: echo ${{ steps.updater.outputs.matrix }}
name: Show Matrix
name: Show New Jobs
shell: bash
33 changes: 31 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,35 @@ The workflow [jobs-poster.yaml](.github/workflows/jobs-poster.yaml) is run on an
to `main` with changes to `_data/jobs.yml`. If new jobs are found, it will post the Job URL to
the USRSE Slack `#jobs` channel. It utilizes the [Jobs updater](https://github.com/rseng/jobs-updater)
Github Action by @vsoch and @jhkennedy to parse the `_data/jobs.yml` file for new jobs and post them
the USRSE Slack.
the USRSE Slack. For the action:

- unique: determines the field in the jobs.yaml that determines uniqueness (defaults to url)
- keys: a comma separated list of fields to include. All except for url will have a prefix, so it's recommended to put the url last.

The other fields are intuitive. Example output (in the console that might go to Slack or Twitter)
for a few jobs (done in the testing repository) looks like the following:

```
New Job! 🕶️
Name: Data Engineer & Full Stack Software Engineer
Location: Scoot Science - remote in the US or Canada
https://www.scootscience.com/careers/
New Job! 🔥️
Name: Assistant Research Programmer/Research Programmer/Senior Research Programmer
Location: National Center for Supercomputing Applications / University of Illinois, Urbana, IL
https://jobs.illinois.edu/academic-job-board/job-details?jobID=130370&job=research-programmer-national-center-for-supercomputing-applications-130370
New Job! 🤖️
Name: Assistant Research Programmer/Research Programmer/Senior Research Programmer
Location: National Center for Supercomputing Applications / University of Illinois, Urbana, IL
https://jobs.hr.wisc.edu/en-us/job/510571/researcher
New Job! 👉️
Name: Assistant Research Programmer/Research Programmer/Senior Research Programmer
Location: National Center for Supercomputing Applications / University of Illinois, Urbana, IL
https://jobs.ornl.gov/job/Oak-Ridge-Full-Stack-Software-Engineer-TN-37830/793411000/
```

#### Post New Jobs to Twitter

Expand All @@ -475,12 +503,13 @@ Importantly, once you create the bot you'll need to add the following secrets to
Yes, this means that the tokens are specific to this account.

#### Greetings

This simple greetings action greets first time users (for issues).
The logic of this is determined by the [greetings.yml](.github/workflows/greetings.yml)
workflow.


#### Member Counts

Two scripts help to create a branch with an updated [member counts file](_data/memberCounts.csv)
that starts with the prefix `update/member-counts`. The workflow [member-counts.yaml](.github/workflows/member-counts.yaml) will generate an updated file and commit and push to a new branch, and it uses [pull-request.sh](scripts/pull-request.sh) to then open a PR with the new branch to the repository. For GitHub CI, there are currently no secrets or credentials, and no setup is required - having actions enabled for the repository and placing the file under `.github/workflows`
enables it.
Expand Down

0 comments on commit 193d8cd

Please sign in to comment.