19 Commits

Author SHA1 Message Date
Gitea Actions
b0c6976a95 Update manifest version to 7.2.0 [▶️] 2025-12-22 04:51:10 +00:00
a674163f7f fix release build, add readme update for some repo
All checks were successful
Build, Push, Publish / Build & Release (push) Successful in 23m42s
2025-12-22 01:43:23 -03:00
Gitea Actions
a52d95e620 Sync README from template [▶️] 2025-12-22 02:24:08 +00:00
Gitea Actions
fdc5b46ef3 Update manifest version to 7.1.7 [▶️] 2025-12-22 01:49:29 +00:00
7aa47b74b9 Merge branch 'main' of https://git.icc.gg/ivancarlos/bundledcmdb
All checks were successful
Build, Push, Publish / Build & Release (push) Successful in 23m1s
2025-12-21 22:49:10 -03:00
fa056218d8 fix readme updater not working 2025-12-21 22:49:03 -03:00
Gitea Actions
c4cb329139 Update manifest version to 7.1.6 [▶️] 2025-12-22 01:02:18 +00:00
e30591b584 make update_readme action
All checks were successful
Build, Push, Publish / Build & Release (push) Successful in 23m12s
2025-12-21 21:57:10 -03:00
Gitea Actions
fe849df6db Update manifest version to 7.1.5 [▶️] 2025-12-22 00:52:31 +00:00
e633457ed3 Upload files to ".gitea/workflows"
Some checks failed
Build, Push, Publish / Build & Release (push) Has been cancelled
2025-12-22 00:52:17 +00:00
Gitea Actions
e4cff69469 Update manifest version to 7.1.4 [▶️] 2025-12-22 00:28:43 +00:00
c24cf70d77 Update README.md
All checks were successful
Build, Push, Publish / Build & Release (push) Successful in 23m15s
2025-12-22 00:23:28 +00:00
Gitea Actions
e817dfe30c Update manifest version to 7.1.3 [▶️] 2025-12-22 00:15:23 +00:00
e05fa1cab6 fix .zip release
Some checks failed
Build, Push, Publish / Build & Release (push) Has been cancelled
2025-12-21 21:09:53 -03:00
Gitea Actions
7338210bcf Update manifest version to 7.1.2 [▶️] 2025-12-22 00:02:07 +00:00
6408e0c923 update release_build to greate zip file on releases
Some checks failed
Build, Push, Publish / Build & Release (push) Has been cancelled
2025-12-21 21:01:44 -03:00
Gitea Actions
4131b1dd1c Update manifest version to 7.1.1 [▶️] 2025-12-21 23:13:46 +00:00
a2feef4c08 fix addming manager to link
All checks were successful
Build, Push, Publish / Build & Release (push) Successful in 23m3s
2025-12-21 20:13:20 -03:00
f3743699a2 fix admin not show all admin users 2025-12-21 20:10:34 -03:00
5 changed files with 83 additions and 41 deletions

View File

@@ -5,9 +5,6 @@ on:
branches: branches:
- main - main
workflow_dispatch: workflow_dispatch:
schedule:
- cron: '28 5 * * *'
# workflow_run support in Gitea can be tricky, keeping it but might need adjustment
workflow_run: workflow_run:
workflows: ["Sync Repo"] workflows: ["Sync Repo"]
types: types:
@@ -265,6 +262,11 @@ jobs:
git commit -m "Update manifest version to ${{ steps.version.outputs.VERSION }} [▶️]" || echo "Nothing to commit" git commit -m "Update manifest version to ${{ steps.version.outputs.VERSION }} [▶️]" || echo "Nothing to commit"
git push origin main git push origin main
- name: 🛠 Install zip
if: steps.check_commits.outputs.commit_count != '0'
run: |
apt-get update && apt-get install -y zip
- name: 📦 Create ZIP package (excluding certain files) - name: 📦 Create ZIP package (excluding certain files)
if: steps.check_commits.outputs.commit_count != '0' if: steps.check_commits.outputs.commit_count != '0'
run: | run: |
@@ -319,11 +321,10 @@ jobs:
ZIP_NAME="${{ steps.version.outputs.ZIP_NAME }}" ZIP_NAME="${{ steps.version.outputs.ZIP_NAME }}"
FILE_PATH="./$ZIP_NAME" FILE_PATH="./$ZIP_NAME"
curl -s -X POST "${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases/$RELEASE_ID/assets" \ curl --fail -s -X POST "${{ gitea.api_url }}/repos/${{ gitea.repository }}/releases/$RELEASE_ID/assets?name=$ZIP_NAME" \
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ -H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \
-H "Content-Type: application/zip" \ -H "Content-Type: application/zip" \
--data-binary @"$FILE_PATH" \ --data-binary @"$FILE_PATH"
-o /dev/null
# ----- Docker steps ----- # ----- Docker steps -----
- name: Clone Upstream Code (if needed) - name: Clone Upstream Code (if needed)

View File

@@ -0,0 +1,59 @@
name: Update README
permissions:
contents: write
on:
workflow_dispatch:
schedule:
- cron: "0 4 * * *" # Every day at 4 AM UTC
jobs:
update-readme:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
env:
SOURCE_REPO: ivancarlos/.gitea
SOURCE_BRANCH: main
steps:
- name: Checkout current repository
uses: actions/checkout@v4
- name: Checkout source README template
uses: actions/checkout@v4
with:
repository: ${{ env.SOURCE_REPO }}
ref: ${{ env.SOURCE_BRANCH }}
token: ${{ secrets.CR_PAT }}
path: source_readme
- name: Update README.md (footer only)
run: |
set -e
# --- Extract footer block from source (everything from <!-- footer --> onward) ---
FOOTER=$(awk '/<!-- footer -->/{flag=1}flag' source_readme/README.md)
# --- Replace everything after <!-- footer --> with FOOTER ---
awk -v footer="$FOOTER" '
/<!-- footer -->/ {
print footer
found=1
exit
}
{ print }
' README.md > README.tmp && mv README.tmp README.md
- name: Remove source_readme from git index
run: rm -rf source_readme
- name: Commit and push changes
run: |
git config user.name "Gitea Actions"
git config user.email "actions@git.icc.gg"
git add README.md
git commit -m "Sync README from template [▶️]" || echo "Nothing to commit"
git push origin ${{ github.ref_name }}

View File

@@ -1,19 +1,6 @@
# Bundled CMDB # Bundled CMDB
Small CMDB project that uses ESET data sent to database for asset management, uses Keycloak as SSO provider for user authentication, S3 for file submission and access related to each asset Small CMDB project that uses ESET data sent to database for asset management, uses Keycloak as SSO provider for user authentication, S3 for file submission and access related to each asset
<!-- buttons -->
[![Stars](https://img.shields.io/github/stars/ivancarlosti/bundledcmdb?label=⭐%20Stars&color=gold&style=flat)](https://github.com/ivancarlosti/bundledcmdb/stargazers)
[![Watchers](https://img.shields.io/github/watchers/ivancarlosti/bundledcmdb?label=Watchers&style=flat&color=red)](https://github.com/sponsors/ivancarlosti)
[![Forks](https://img.shields.io/github/forks/ivancarlosti/bundledcmdb?label=Forks&style=flat&color=ff69b4)](https://github.com/sponsors/ivancarlosti)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/m/ivancarlosti/bundledcmdb?label=Activity)](https://github.com/ivancarlosti/bundledcmdb/pulse)
[![GitHub Issues](https://img.shields.io/github/issues/ivancarlosti/bundledcmdb?label=Issues&color=orange)](https://github.com/ivancarlosti/bundledcmdb/issues)
[![License](https://img.shields.io/github/license/ivancarlosti/bundledcmdb?label=License)](LICENSE)
[![GitHub last commit](https://img.shields.io/github/last-commit/ivancarlosti/bundledcmdb?label=Last%20Commit)](https://github.com/ivancarlosti/bundledcmdb/commits)
[![Security](https://img.shields.io/badge/Security-View%20Here-purple)](https://github.com/ivancarlosti/bundledcmdb/security)
[![Code of Conduct](https://img.shields.io/badge/Code%20of%20Conduct-2.1-4baaaa)](https://github.com/ivancarlosti/bundledcmdb?tab=coc-ov-file)
[![GitHub Sponsors](https://img.shields.io/github/sponsors/ivancarlosti?label=GitHub%20Sponsors&color=ffc0cb)][sponsor]
<!-- endbuttons -->
## Requirement: ## Requirement:
* [Docker Compose](https://docs.docker.com/engine/install/) * [Docker Compose](https://docs.docker.com/engine/install/)
@@ -48,14 +35,7 @@ docker compose pull && docker compose up -d
[**buying me a coffee**][buymeacoffee], [**donate by paypal**][paypal], [**sponsor this project**][sponsor] or just [**leave a star**](../..)⭐ [**buying me a coffee**][buymeacoffee], [**donate by paypal**][paypal], [**sponsor this project**][sponsor] or just [**leave a star**](../..)⭐
|Thanks for your support, it is much appreciated!| |Thanks for your support, it is much appreciated!|
[cc]: https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-code-of-conduct-to-your-project [ivancarlos]: https://ivancarlos.me
[contributing]: https://docs.github.com/en/articles/setting-guidelines-for-repository-contributors
[security]: https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository
[support]: https://docs.github.com/en/articles/adding-support-resources-to-your-project
[it]: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/configuring-issue-templates-for-your-repository#configuring-the-template-chooser
[prt]: https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/creating-a-pull-request-template-for-your-repository
[funding]: https://docs.github.com/en/articles/displaying-a-sponsor-button-in-your-repository
[ivancarlos]: https://ivancarlos.it
[buymeacoffee]: https://www.buymeacoffee.com/ivancarlos [buymeacoffee]: https://www.buymeacoffee.com/ivancarlos
[paypal]: https://icc.gg/donate [paypal]: https://icc.gg/donate
[sponsor]: https://github.com/sponsors/ivancarlosti [sponsor]: https://github.com/sponsors/ivancarlosti

View File

@@ -1,4 +1,4 @@
{ {
"version": "7.1.0", "version": "7.2.0",
"author": "Ivan Carlos" "author": "Ivan Carlos"
} }

View File

@@ -37,7 +37,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$email = $_POST['email'] ?? ''; $email = $_POST['email'] ?? '';
$newRole = $_POST['role_to_set'] ?? ''; $newRole = $_POST['role_to_set'] ?? '';
if ($email && in_array($newRole, ['admin', 'superadmin'])) { if ($email && in_array($newRole, ['admin', 'superadmin', 'manager'])) {
// Update user role // Update user role
$stmt = $pdo->prepare("UPDATE users SET role = :role WHERE email = :email"); $stmt = $pdo->prepare("UPDATE users SET role = :role WHERE email = :email");
$success = $stmt->execute([':role' => $newRole, ':email' => $email]); $success = $stmt->execute([':role' => $newRole, ':email' => $email]);
@@ -73,7 +73,7 @@ if ($_SERVER['REQUEST_METHOD'] === 'POST') {
} }
// Fetch Admins and SuperAdmins // Fetch Admins and SuperAdmins
$stmt = $pdo->query("SELECT * FROM users WHERE role IN ('admin', 'superadmin') ORDER BY role DESC, email ASC"); $stmt = $pdo->query("SELECT * FROM users WHERE LOWER(TRIM(role)) IN ('admin', 'superadmin', 'manager') ORDER BY role DESC, email ASC");
$admins = $stmt->fetchAll(PDO::FETCH_ASSOC); $admins = $stmt->fetchAll(PDO::FETCH_ASSOC);
// Fetch All Users for Dropdown // Fetch All Users for Dropdown
@@ -134,6 +134,7 @@ $allUsers = $stmt->fetchAll(PDO::FETCH_COLUMN);
} }
.role-superadmin { background: #6f42c1; color: white; } .role-superadmin { background: #6f42c1; color: white; }
.role-admin { background: #28a745; color: white; } .role-admin { background: #28a745; color: white; }
.role-manager { background: #17a2b8; color: white; }
.btn-remove { .btn-remove {
background: #dc3545; background: #dc3545;
@@ -186,6 +187,7 @@ $allUsers = $stmt->fetchAll(PDO::FETCH_COLUMN);
<label for="role">Role:</label> <label for="role">Role:</label>
<select name="role_to_set" id="role" required> <select name="role_to_set" id="role" required>
<option value="manager">Manager</option>
<option value="admin">Admin</option> <option value="admin">Admin</option>
<option value="superadmin">SuperAdmin</option> <option value="superadmin">SuperAdmin</option>
</select> </select>