Compare commits

...

20 Commits

Author SHA1 Message Date
d267ff74f5 Add release action
All checks were successful
Publish release / build (push) Successful in 26s
2024-11-06 17:01:30 -05:00
b4727335f5 Add release action
Some checks failed
Publish release / build (push) Failing after 1m2s
2024-11-06 16:59:21 -05:00
5b1e97a439 Remove docker image
Some checks failed
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Failing after 1m10s
2024-11-05 21:10:22 -05:00
4a6a6999aa Remove username docker
Some checks failed
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Has been cancelled
2024-11-05 21:07:59 -05:00
059750c5ee Remove reference for github
Some checks failed
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Has been cancelled
2024-11-05 21:05:25 -05:00
6421f74280 Merge pull request 'fix: Update CI pipeline' (#2) from ci into main
Some checks failed
CODESTYLE / Run codestyle check (push) Successful in 38s
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Has been cancelled
CodeQL / Analyze (python) (push) Has started running
Reviewed-on: #2
2024-11-03 19:53:06 -08:00
0eb7e758fd fix: Update runner
All checks were successful
CODESTYLE / Run codestyle check (push) Successful in 58s
CI / Run Test and Review PR (pull_request) Successful in 14m32s
2024-11-03 22:33:21 -05:00
9a45778e72 fix: Update action.yml
Some checks failed
CODESTYLE / Run codestyle check (push) Successful in 1m35s
CI / Run Test and Review PR (pull_request) Failing after 8m1s
2024-11-03 21:05:11 -05:00
779d9cefdd fix: Update CI pipeline
Some checks are pending
CODESTYLE / Run codestyle check (push) Waiting to run
2024-11-03 21:03:05 -05:00
522abb4492 fix: Update docker build
Some checks failed
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Has been cancelled
CODESTYLE / Run codestyle check (push) Successful in 26s
2024-11-03 20:43:38 -05:00
21ab52802b fix: Update text
All checks were successful
CODESTYLE / Run codestyle check (push) Successful in 21s
2024-11-03 20:00:34 -05:00
70f50d4e0a fix: Update actions URLS 2024-11-03 19:54:58 -05:00
f17e5ade05 fix: Update branch name
Some checks failed
CodeQL / Analyze (python) (push) Failing after 11m19s
2024-11-03 19:40:10 -05:00
1a8e6df609 fix: Update action urls 2024-11-03 19:38:08 -05:00
be8e3b9f7b Merge pull request 'order' (#1) from order into master
Some checks failed
CODESTYLE / Run codestyle check (push) Failing after 23m25s
CodeQL / Analyze (python) (push) Failing after 11m21s
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Successful in 34m2s
Reviewed-on: #1
2024-11-03 10:46:19 -08:00
45a6a62647 fix: Text update
Some checks failed
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Has been cancelled
CODESTYLE / Run codestyle check (push) Has been cancelled
CI / Run Test and Review PR (pull_request) Has been cancelled
CodeQL / Analyze (python) (pull_request) Has been cancelled
Dependency review / dependency-review (pull_request) Failing after 25s
2024-11-03 13:08:07 -05:00
8808bce0d9 fix: Text fix
Some checks are pending
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Waiting to run
CODESTYLE / Run codestyle check (push) Waiting to run
2024-11-03 13:05:48 -05:00
7b546b969a fix: Emoji for people
Some checks are pending
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Waiting to run
CODESTYLE / Run codestyle check (push) Waiting to run
2024-11-03 13:04:02 -05:00
90e9c14d83 fix: Translation
Some checks are pending
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Waiting to run
CODESTYLE / Run codestyle check (push) Waiting to run
2024-11-03 12:57:33 -05:00
e2848201da feature: Reorder and fix text
Some checks are pending
PUBLISH_IMAGE / Publish 'waka-readme-stats' image (push) Waiting to run
CODESTYLE / Run codestyle check (push) Waiting to run
2024-11-03 12:54:21 -05:00
8 changed files with 50 additions and 42 deletions

View File

@@ -5,7 +5,7 @@ on:
concurrency: concurrency:
group: ${{ github.workflow }}-${{ github.ref }} group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' }} cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs: jobs:
publish-server-image: publish-server-image:
@@ -22,14 +22,14 @@ jobs:
- name: Log in to the container registry 🚪 - name: Log in to the container registry 🚪
uses: docker/login-action@v2 uses: docker/login-action@v2
with: with:
username: jofranmtz username: ${{ vars.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }} password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker 🏋️ - name: Extract metadata (tags, labels) for Docker 🏋️
id: meta id: meta
uses: docker/metadata-action@v4 uses: docker/metadata-action@v4
with: with:
images: jofranmtz/wakapi-readme-stats images: ${{ vars.DOCKERHUB_IMAGE }}
tags: | tags: |
type=ref,event=branch type=ref,event=branch
type=ref,event=pr type=ref,event=pr
@@ -39,7 +39,7 @@ jobs:
- name: Build and push Docker image 🏗️ - name: Build and push Docker image 🏗️
uses: docker/build-push-action@v4 uses: docker/build-push-action@v4
with: with:
push: ${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/releases') }} push: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/releases') }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha cache-from: type=gha

View File

@@ -15,10 +15,10 @@ jobs:
steps: steps:
- name: Checkout 🛎️ - name: Checkout 🛎️
uses: actions/checkout@v3 uses: https://github.com/actions/checkout@v3
- name: Setup Python 3.11 🐍 - name: Setup Python 3.11 🐍
uses: actions/setup-python@v4 uses: https://github.com/actions/setup-python@v4
with: with:
python-version: 3.11 python-version: 3.11
cache: 'pip' cache: 'pip'
@@ -29,11 +29,6 @@ jobs:
- name: Create Assets Folder 📥 - name: Create Assets Folder 📥
run: mkdir assets run: mkdir assets
- name: Create Previous Comments 🫣
uses: int128/hide-comment-action@v1
with:
starts-with: "README stats current output:"
- name: Run Action Preview on Current Code 🧪 - name: Run Action Preview on Current Code 🧪
id: make-stats id: make-stats
env: env:
@@ -62,7 +57,7 @@ jobs:
run: python3 sources/main.py run: python3 sources/main.py
- name: Save Branch Name Without Slashes 📛 - name: Save Branch Name Without Slashes 📛
if: ${{ github.ref != 'refs/heads/master' }} if: ${{ github.ref != 'refs/heads/main' }}
env: env:
BRANCH_NAME: ${{ github.head_ref || github.ref_name }} BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
run: | run: |
@@ -71,16 +66,8 @@ jobs:
echo BRANCH_NAME=${BRANCH_NAME} >> $GITHUB_ENV echo BRANCH_NAME=${BRANCH_NAME} >> $GITHUB_ENV
- name: Upload Artifact 📦 - name: Upload Artifact 📦
uses: actions/upload-artifact@v3 uses: https://github.com/actions/upload-artifact@v3
if: ${{ github.ref != 'refs/heads/master' }} if: ${{ github.ref != 'refs/heads/main' }}
with: with:
name: ${{ format('github-pages-for-branch-{0}', env.BRANCH_NAME) }} name: ${{ format('github-pages-for-branch-{0}', env.BRANCH_NAME) }}
path: assets path: assets
- name: Create Comment 💬
uses: jungwinter/comment@v1
with:
type: create
body: ${{ steps.make-stats.outputs.README_CONTENT }}
issue_number: ${{ github.event.number }}
token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -2,7 +2,7 @@ name: CodeQL
on: on:
push: push:
branches: master branches: main
pull_request: pull_request:
workflow_dispatch: workflow_dispatch:
schedule: schedule:
@@ -29,10 +29,10 @@ jobs:
steps: steps:
- name: Checkout 🛎️ - name: Checkout 🛎️
uses: actions/checkout@v3 uses: https://github.com/actions/checkout@v4
- name: Setup Python 3.11 🐍 - name: Setup Python 3.11 🐍
uses: actions/setup-python@v4 uses: https://github.com/actions/setup-python@v4
with: with:
python-version: 3.11 python-version: 3.11
cache: 'pip' cache: 'pip'
@@ -44,13 +44,13 @@ jobs:
echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV echo "CODEQL_PYTHON=$(which python)" >> $GITHUB_ENV
- name: Initialize CodeQL 🧑‍💻 - name: Initialize CodeQL 🧑‍💻
uses: github/codeql-action/init@v2 uses: https://github.com/github/codeql-action/init@v2
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
queries: security-and-quality queries: security-and-quality
setup-python-dependencies: false setup-python-dependencies: false
- name: Perform CodeQL Analysis 📈 - name: Perform CodeQL Analysis 📈
uses: github/codeql-action/analyze@v2 uses: https://github.com/github/codeql-action/analyze@v2
with: with:
category: "/language:${{matrix.language}}" category: "/language:${{matrix.language}}"

View File

@@ -10,10 +10,10 @@ jobs:
steps: steps:
- name: Checkout 🛎️ - name: Checkout 🛎️
uses: actions/checkout@v3 uses: https://github.com/actions/checkout@v3
- name: Setup Python 3.11 🐍 - name: Setup Python 3.11 🐍
uses: actions/setup-python@v4 uses: https://github.com/actions/setup-python@v4
with: with:
python-version: 3.11 python-version: 3.11

View File

@@ -1,4 +1,4 @@
name: Dependency review name: DEPENDENCY_REVIEW
on: pull_request on: pull_request
permissions: permissions:
@@ -11,9 +11,9 @@ jobs:
steps: steps:
- name: Checkout repository 🛎️ - name: Checkout repository 🛎️
uses: actions/checkout@v3 uses: https://github.com/actions/checkout@v4
- name: Dependency review 👀 - name: Dependency review 👀
uses: actions/dependency-review-action@v3 uses: https://github.com/actions/dependency-review-action@v4.4.0
with: with:
comment-summary-in-pr: true comment-summary-in-pr: true

15
.github/workflows/publish_release.yml vendored Normal file
View File

@@ -0,0 +1,15 @@
name: Publish release
on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: 1.0

View File

@@ -82,14 +82,7 @@ async def get_short_github_info() -> str:
:returns: String representation of the info. :returns: String representation of the info.
""" """
if EM.SHOW_FOLLOWERS: stats = str()
DBM.i("Adding profile followers...")
stats = f"**🐱 {FM.t('Awesome People!')}** \n\n"
data = GHM.USER.get_followers()
for user in data:
username = user.login.replace("-", "--")
stats += f"![@{user.login}](https://img.shields.io/badge/@{username}-black?style=plastic&logo=github&logoColor=fff&link={user.html_url})"
stats += f"\n\nIf you follow my account you can appear on this list. *This list updates every 12h*\n\n"
DBM.i("Adding short GitHub info...") DBM.i("Adding short GitHub info...")
stats += f"**🐱 {FM.t('My GitHub Data')}** \n\n" stats += f"**🐱 {FM.t('My GitHub Data')}** \n\n"
@@ -175,6 +168,17 @@ async def get_stats() -> str:
yearly_data, commit_data = dict(), dict() yearly_data, commit_data = dict(), dict()
DBM.w("User yearly data not needed, skipped.") DBM.w("User yearly data not needed, skipped.")
if EM.SHOW_FOLLOWERS:
DBM.i("Adding profile followers...")
stats += f"**⭐ {FM.t('Awesome People!')}** \n\n"
data = GHM.USER.get_followers()
for user in data:
username = user.login.replace("-", "--")
stats += f"[![@{user.login}](https://img.shields.io/badge/@{username}-black?style=plastic&logo=github&logoColor=fff)]({user.html_url}) "
stats += "\n\n###### Follow my account to appear on this list. *The list updates every 12h*\n\n"
stats += f"**📈 {FM.t('Stats')}** \n\n"
if EM.SHOW_TOTAL_CODE_TIME: if EM.SHOW_TOTAL_CODE_TIME:
DBM.i("Adding total code time info...") DBM.i("Adding total code time info...")
data = await DM.get_remote_json("waka_all") data = await DM.get_remote_json("waka_all")
@@ -226,6 +230,7 @@ async def main():
DBM.i("Managers initialized.") DBM.i("Managers initialized.")
stats = await get_stats() stats = await get_stats()
DBM.i(str(stats))
if not EM.DEBUG_RUN: if not EM.DEBUG_RUN:
GHM.update_readme(stats) GHM.update_readme(stats)
GHM.commit_update() GHM.commit_update()

View File

@@ -72,7 +72,8 @@
"private repositories": "%d Private Repositories", "private repositories": "%d Private Repositories",
"I am an Early": "I'm an Early 🐤", "I am an Early": "I'm an Early 🐤",
"I am a Night": "I'm a Night 🦉", "I am a Night": "I'm a Night 🦉",
"Awesome People!": "Awesome People!" "Awesome People!": "Awesome People!",
"Stats": "Stats"
}, },
"bn": { "bn": {
"Monday": "সোমবার", "Monday": "সোমবার",