You've already forked wakapi-readme-stats
Compare commits
9 Commits
be8e3b9f7b
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 6421f74280 | |||
| 0eb7e758fd | |||
| 9a45778e72 | |||
| 779d9cefdd | |||
| 522abb4492 | |||
| 21ab52802b | |||
| 70f50d4e0a | |||
| f17e5ade05 | |||
| 1a8e6df609 |
14
.github/workflows/build_image.yml
vendored
14
.github/workflows/build_image.yml
vendored
@@ -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:
|
||||||
@@ -14,20 +14,20 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout 🛎️
|
- name: Checkout 🛎️
|
||||||
uses: actions/checkout@v3
|
uses: https://github.com/actions/checkout@v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx 🐋
|
- name: Set up Docker Buildx 🐋
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: https://github.com/docker/setup-buildx-action@v2
|
||||||
|
|
||||||
- name: Log in to the container registry 🚪
|
- name: Log in to the container registry 🚪
|
||||||
uses: docker/login-action@v2
|
uses: https://github.com/docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
username: jofranmtz
|
username: jofranmtz
|
||||||
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: https://github.com/docker/metadata-action@v4
|
||||||
with:
|
with:
|
||||||
images: jofranmtz/wakapi-readme-stats
|
images: jofranmtz/wakapi-readme-stats
|
||||||
tags: |
|
tags: |
|
||||||
@@ -37,9 +37,9 @@ jobs:
|
|||||||
type=semver,pattern={{major}}.{{minor}}
|
type=semver,pattern={{major}}.{{minor}}
|
||||||
|
|
||||||
- name: Build and push Docker image 🏗️
|
- name: Build and push Docker image 🏗️
|
||||||
uses: docker/build-push-action@v4
|
uses: https://github.com/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
|
||||||
|
|||||||
23
.github/workflows/ci.yml
vendored
23
.github/workflows/ci.yml
vendored
@@ -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 }}
|
|
||||||
|
|||||||
10
.github/workflows/codeql.yml
vendored
10
.github/workflows/codeql.yml
vendored
@@ -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}}"
|
||||||
|
|||||||
4
.github/workflows/codestyle.yml
vendored
4
.github/workflows/codestyle.yml
vendored
@@ -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
|
||||||
|
|
||||||
|
|||||||
6
.github/workflows/dependency-review.yml
vendored
6
.github/workflows/dependency-review.yml
vendored
@@ -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
|
||||||
|
|||||||
@@ -175,7 +175,7 @@ async def get_stats() -> str:
|
|||||||
for user in data:
|
for user in data:
|
||||||
username = user.login.replace("-", "--")
|
username = user.login.replace("-", "--")
|
||||||
stats += f"[]({user.html_url}) "
|
stats += f"[]({user.html_url}) "
|
||||||
stats += f"\n\n###### Follow my account to appear on this list. *The list updates every 12h*\n\n"
|
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"
|
stats += f"**📈 {FM.t('Stats')}** \n\n"
|
||||||
|
|
||||||
@@ -230,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()
|
||||||
|
|||||||
Reference in New Issue
Block a user