15 Commits

Author SHA1 Message Date
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 84 additions and 31 deletions

View File

@@ -6,7 +6,7 @@ on:
- main
workflow_dispatch:
schedule:
- cron: '28 5 * * *'
- cron: "28 5 * * *"
# workflow_run support in Gitea can be tricky, keeping it but might need adjustment
workflow_run:
workflows: ["Sync Repo"]
@@ -265,6 +265,11 @@ jobs:
git commit -m "Update manifest version to ${{ steps.version.outputs.VERSION }} [▶️]" || echo "Nothing to commit"
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)
if: steps.check_commits.outputs.commit_count != '0'
run: |
@@ -319,11 +324,10 @@ jobs:
ZIP_NAME="${{ steps.version.outputs.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 "Content-Type: application/zip" \
--data-binary @"$FILE_PATH" \
-o /dev/null
--data-binary @"$FILE_PATH"
# ----- Docker steps -----
- name: Clone Upstream Code (if needed)

View File

@@ -0,0 +1,60 @@
name: Update README
# Allow Gitea Actions to commit and push changes
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
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:
* [Docker Compose](https://docs.docker.com/engine/install/)

View File

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

View File

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