https://github.com/miafoo/overskudsvaccine
Easily automate signing up for leftover vaccines in Denmark using Github Actions.
https://github.com/miafoo/overskudsvaccine
actions automation deno puppeteer vaccine vaccine-appointments
Last synced: about 1 month ago
JSON representation
Easily automate signing up for leftover vaccines in Denmark using Github Actions.
- Host: GitHub
- URL: https://github.com/miafoo/overskudsvaccine
- Owner: miafoo
- Created: 2021-06-01T08:23:56.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2021-06-10T07:16:10.000Z (almost 5 years ago)
- Last Synced: 2025-10-04T22:29:08.229Z (8 months ago)
- Topics: actions, automation, deno, puppeteer, vaccine, vaccine-appointments
- Language: TypeScript
- Homepage:
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Install dependencies
```
PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/puppeteer@9.0.1/install.ts
```
# Run
```
FULL_NAME="John Smith" \
AGE="29" \
STREET="Street 1B" \
ZIP_AND_CITY="1234 Copenhagen" \
PHONE="12345678" \
LOCATION="Copy from locations.ts file" \
PUPPETEER_PRODUCT=chrome \
deno run -A --unstable main.ts
```
You can also set `DRY_RUN=true` to run without submitting the form. This is
useful when debugging.
# Available locations
Check the `locations.ts` file.
# Github Actions for automating the process
You can create a private Github repository and run Github actions against this repository.
The example below will run at 7am UTC every day. Make sure you update the the `env` section, as well as setting up the appropriate locations (find list in `locations.ts`). Please also make sure to set `DRY_RUN` to `false` (or remove it) once you're done configuring and ready to submit the forms.
```yaml
name: Daily run
on:
workflow_dispatch:
schedule:
- cron: "0 7 * * *"
jobs:
main:
runs-on: ubuntu-latest
env:
DRY_RUN: true # NOTE: Change this to `false` to actually submit the form!
FULL_NAME: John Smith
AGE: 29
STREET: Street 1B
ZIP_AND_CITY: 1234 Copenhagen
PHONE: 12345678
steps:
- name: Setup repo
uses: actions/checkout@v2
with:
repository: mikfoo/overskudsvaccine
ref: main
- name: Setup Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x
- name: Setup Puppeteer
run: PUPPETEER_PRODUCT=chrome deno run -A --unstable https://deno.land/x/puppeteer@9.0.1/install.ts
#
# You can add as many locations as you want. Example with different 3 locations:
#
- name: Run location 1
run: deno run -A --unstable main.ts
env:
LOCATION: Ballerup, Baltorpvej 18
- name: Run location 2
run: deno run -A --unstable main.ts
env:
LOCATION: Ishøj, Vejledalen 17
- name: Run location 3
run: deno run -A --unstable main.ts
env:
LOCATION: Bella Center, Ørestad Boulevard/Martha Christensens Vej, København S
```
Note that using Github Actions for this could be against the terms so use at your own risk - read more: https://docs.github.com/en/github/site-policy/github-terms-for-additional-products-and-features#actions