Skip to content

Latest commit

 

History

History
77 lines (50 loc) · 3 KB

autofill-github-actions.md

File metadata and controls

77 lines (50 loc) · 3 KB

Integrate autofill feature with Github Actions

Prerequisite

Before following this tutorial, please make sure to have an active Github account.

Steps

There are four main steps to configure the bot to access your local repository and logbook account;

  1. Fork the project to your Github account
  2. Make a Github token to access the repository. This is used to make a local daily log of your logbook.
  3. Make repository secrets. These values are used to access your repository and logbook page.
  4. Add Github Actions

Fork the project

  1. Fork the project repository to your Github account test

Make a Github access token

  1. Click your profile and select "Settings" test

  2. On the bottom left of the page, click "Developer settings" test

  3. On the left, you will find a sidebar. Click on "Personal access token" test

  4. Fill in the note and check the required permissions for the bot to access the repository test

  5. You will get your Github token. COPY IT IMMEDIATELY, once you refresh/reload the page, you will not see the code again test

Make repository secrets

  1. Go back to your forked repository settings. On the left, you will find a sidebar. Click on "Secrets" test

  2. Here, you will need to create new secrets. test

These values are used to access the repository and your logbook page

Name Value
MY_GITHUB_TOKEN Paste your github token you previously made
MY_USERNAME Your BINUS ID (NIM)
MY_PASSWORD Your account password

Secrets are encrypted and is only accessable by the repository in your own account, so it won't be visible to anyone.

test

Add Github Actions

  1. Open this link on new tab, then copy the whole script test

  2. Go to the Actions tab, and set a new workflow test

  3. Choose "set up workflow yourself" test

  4. Delete the boilerplate and paste the whole script there, and name it autofill.yml test

  5. On line 40, there will be a step to commit data to your forked repository. Replace INSERT_YOUR_GITHUB_EMAIL_HERE and INSERT_YOUR_GITHUB_USERNAME_HERE with your credentials. test

That's it! Github Actions will use that value to access the repository and your logbook account to automatically fill your logbook.

Preview

test