Skip to content

Commit

Permalink
- initial version
Browse files Browse the repository at this point in the history
  • Loading branch information
Evgeny Svirsky committed Nov 11, 2023
0 parents commit b1b0cc2
Show file tree
Hide file tree
Showing 12 changed files with 599 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
VFS_GLOBAL_URL=https://lift-api.vfsglobal.com/appointment/CheckIsSlotAvailable
## TO DO: Move to secrets
AUTHENTICATED_TOKEN=AUTHENTICATED_TOKEN
35 changes: 35 additions & 0 deletions .github/workflows/schedule.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Execute the script to check VFS global dates
on:
schedule:
- cron: "0 * * * *" # Every hour
workflow_dispatch:

jobs:
execute_script:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v3
- name: Get Node.js version
id: nodejs-version
run: echo ::set-output name=NODE_VERSION::$(cat .nvmrc)

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: ${{ steps.nodejs-version.outputs.NODE_VERSION }}
registry-url: https://registry.npmjs.org/

- name: Prepare/restore cache
uses: actions/cache@v3
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/package-lock.json') }}

- name: Install packages
run: npm ci
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN_READ}}

- name: Execute
run: |
npm start
40 changes: 40 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# compiled output
/dist
/node_modules

# docker volumes
.data/*

# tmp files
.tmp/

# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*

# OS
.DS_Store

# Tests
/coverage
/.nyc_output

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
v20
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# VFS Global checker for visa dates availability

### How to use:
1. Install packages with command:
```shell
nvm exec npm i
```

2. Update `.env` file

3. Execute the command:
```shell
nvm exec npm start
```
Loading

0 comments on commit b1b0cc2

Please sign in to comment.