Skip to content

Commit

Permalink
📝 update readme and changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
yi-Xu-0100 committed Oct 20, 2020
1 parent 7a915e5 commit 7f7e9d0
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 17 deletions.
26 changes: 23 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,25 @@ The emoji used in the `GitHub` commit message is based on [gitmoji](https://gitm

### 🗑 Deprecated

## [1.1.0] - 2020-10-20

### ✨ Added

- ✅ test static_list support
- ✨ add output for traffic path

### ♻️ Changed

- ♻️ enhance log output
- ♻️ enhance debug mode
- ♻️ enhance resource name
- 🔥 delete sync2gitee
- 💚 update workflow

### 🐛 Fixed

- 🐛 fix count reset bug

## [1.0.1] - 2020-10-08

### ✨ Added
Expand All @@ -35,11 +54,12 @@ The emoji used in the `GitHub` commit message is based on [gitmoji](https://gitm
- 🎉 [traffic to badge](https://github.com/marketplace/actions/traffic-to-badge) function was completed
- 🌐 [README.md](./README.md)
- 📝 [README_CN.md](./README_CN.md)
- 🌐 [CHANGELOGE.md](./CHANGELOGE.md)
- 📝 [CHANGELOGE_CN.md](./CHANGELOG_CN.md)
- 🌐 [CHANGELOG.md](./CHANGELOG.md)
- 📝 [CHANGELOG_CN.md](./CHANGELOG_CN.md)
- 👷 [workflows](./.github/workflows/autoRelease.yml) to auto release
- 👷 [prettier](./.prettierrc.json) to format files

[unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.1...HEAD
[unreleased]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.1.0...HEAD
[1.1.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.1
[1.0.1]: https://github.com/olivierlacan/keep-a-changelog/compare/v1.0.1
[1.0.0]: https://github.com/mindsers/changelog-reader-action/compare/v1.0.0
45 changes: 31 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ input:
## 📝 Example that using actions-gh-pages to push traffic branch
This example use [`peaceiris/actions-gh-pages@v3.6.4`](https://github.com/peaceiris/actions-gh-pages) to publish traffic data to `traffic branch`.
This example use [yi-Xu-0100/repo-list-generator](https://github.com/yi-Xu-0100/repo-list-generator) to generate `static_list` and use [`peaceiris/actions-gh-pages`](https://github.com/peaceiris/actions-gh-pages) to publish traffic data to `traffic branch`.

```yaml
name: traffic2badge
Expand All @@ -67,43 +67,57 @@ on:
jobs:
run:
name: Make GitHub Traffic data to Badge
name: Make GitHub Traffic to Badge
runs-on: ubuntu-latest
steps:
- name: Get current repository name
id: info
- name: Checkout code
uses: actions/[email protected]
- name: Get Repo List
id: repo
uses: yi-Xu-0100/[email protected]
with:
my_token: ${{ secrets.TRAFFIC_TOKEN }}
- name: Get Commit Message
id: message
uses: actions/[email protected]
env:
FULL_COMMIT_MESSAGE: '${{ github.event.head_commit.message }}'
with:
github-token: ${{secrets.GITHUB_TOKEN}}
result-encoding: string
script: |
return context.repo.repo;
var message = `${process.env.FULL_COMMIT_MESSAGE}`;
core.info(message);
if (message != '') return message;
var time = new Date(Date.now()).toISOString();
core.info(time);
return `Get traffic data at ${time}`;

- name: Set traffic
uses: yi-Xu-0100/[email protected]
id: traffic
uses: ./
with:
my_token: ${{ secrets.TRAFFIC_TOKEN }}
static_list: '${{ steps.info.outputs.result }}'
static_list: '${{ steps.repo.outputs.repoList }}'
traffic_branch: traffic
views_color: brightgreen
clones_color: brightgreen
logo: github

- name: Deploy
uses: peaceiris/actions-gh-pages@v3.6.4
uses: peaceiris/actions-gh-pages@v3.7.2
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: traffic
publish_dir: ./traffic
publish_dir: ${{ steps.traffic.outputs.traffic_path }}
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
full_commit_message: ${{ github.event.head_commit.message }}
full_commit_message: ${{ steps.message.outputs.result }}

- name: Show traffic data
run: |
cd ./traffic/
ls -a
cd ./traffic-${{ steps.info.outputs.result }}/
cd ${{ steps.traffic.outputs.traffic_path }}
ls -a
```
Expand Down Expand Up @@ -143,3 +157,6 @@ After you generated the PAT, go to `Settings(repository) -> Secrets -> New secre

- [sangonzal/repository-traffic-action](https://github.com/sangonzal/repository-traffic-action)
- [peaceiris/actions-gh-pages](https://github.com/peaceiris/actions-gh-pages)
- [actions/checkout](https://github.com/actions/checkout)
- [actions/github-script](https://github.com/actions/github-script)
- [yi-Xu-0100/repo-list-generator](https://github.com/yi-Xu-0100/repo-list-generator)

0 comments on commit 7f7e9d0

Please sign in to comment.