Skip to content

Commit

Permalink
Replace Circle CI with GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
matchai committed Apr 6, 2019
1 parent 2df7d30 commit f289bca
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 55 deletions.
46 changes: 0 additions & 46 deletions .circleci/config.yml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/main.workflow
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
workflow "Update gist with WakaTime stats" {
resolves = ["update-gist"]
on = "schedule(*/10 * * * *)"
}

action "update-gist" {
uses = "matchai/waka-box@master"
env = {
"GIST_ID" = "968220c97e8da1d047a9a480fa432e54"
}
secrets = [
"GH_TOKEN",
"WAKATIME_API_KEY",
]
}
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@

---

> 📌✨ For more pinned-gist projects like this one, check out: https://github.com/matchai/awesome-pinned-gists
## Setup

### Prep work
Expand All @@ -18,12 +20,12 @@
### Project setup

1. Fork this repo
1. Log into CircleCI with your GitHub (https://circleci.com/vcs-authorize/)
1. Click on "Add Projects" on the sidebar
1. Set up a project with the newly created fork
1. Go to Project Settings > Environment Variables
1. Edit the [environment variable](https://github.com/matchai/bird-box/blob/master/.github/main.workflow?short_path=5225be4#L9-L10) in `.github/main.workflow`:

- **GIST_ID:** The ID portion from your gist url: `https://gist.github.com/matchai/`**`6d5f84419863089a167387da62dd7081`**.

1. Go to the repo **Settings > Secrets**
1. Add the following environment variables:

- **GIST_ID:** The ID portion from your gist url `https://gist.github.com/matchai/`**`6d5f84419863089a167387da62dd7081`**.
- **GITHUB_TOKEN:** The GitHub token generated above.
- **GH_TOKEN:** The GitHub token generated above.
- **WAKATIME_API_KEY:** The API key for your WakaTime account.
2 changes: 1 addition & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const Octokit = require("@octokit/rest");

const {
GIST_ID: gistId,
GITHUB_TOKEN: githubToken,
GH_TOKEN: githubToken,
WAKATIME_API_KEY: wakatimeApiKey
} = process.env;

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion sample.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
GIST_ID=
GITHUB_TOKEN=
GH_TOKEN=
WAKATIME_API_KEY=

0 comments on commit f289bca

Please sign in to comment.