This repository contains the Accurat HCM file downloads for the SDWorx Accurat HCM application.
It will download the files from the SDWorx Accurat HCM application and store them in the files
folder.
This repository will automatically download the files on the 2nd day of the every month.
Github Actions will run the workflow on the 2nd day of every month at 00:00 UTC. GHA will automatically create a commit for newly downloaded files
- Fork this repository and make sure to keep it private. (Because the files contain sensitive information)
- Go to the
Settings
tab of the repository. - Go to
Secrets
and add the following secrets:HCM_PASSWORD
: Your SDWorx Accurat HCM username.HCM_USERNAME
: Your SDWorx Accurat HCM password.
- Go to
Variables
and add the following variables:BASEURL
: The URL of the SDWorx Accurat HCM application. eg:https://hcm3.accurat.net/D12345A
- Go to the
Actions
tab of the repository and enable the workflow. - The workflow will run on the 2nd day of every month and download the files from the SDWorx Accurat HCM application.
To manually run the workflow, go to the Actions
tab of the repository and click on the Run workflow
button.
- Clone the repository and navigate to the folder.
- Install the dependencies using
npm i
. - Run the below command to run the workflow:
BASEURL="" \ HCMUSERNAME="" \ HCMPASSWORD="" \ npx playwright test ## --headed if you want to see the UI
The files will be downloaded to the files
folder.
A special file index.json
is present in the folder that tracks the last downloaded file.
- Delete all the files in
files
folder exceptindex.json
. - Reset the
index.json
file to{"LastRecord":0}
. - Restart the workflow.
- Add support for raising an issue if the HCM asks for password change after 3 months.
If you face any issues, feel free to open an issue in the repository.
If you have any suggestions or improvements, feel free to open an issue or a pull request.
This repository is licensed under the MIT License. See the LICENSE file for more information.