Compare commits
1 Commits
be7017736d
..
dev
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b31a1b953 |
@@ -14,19 +14,29 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
REGISTRY_ADDRESS: registry.ma-al.pl
|
REGISTRY_ADDRESS: registry.ma-al.pl
|
||||||
DOCKER_APP_NAME: cl-project
|
DOCKER_APP_NAME: cl-project
|
||||||
MAAL_REGISTRY_USER: ${{ secret.MAAL_REGISTRY_USER }}
|
MAAL_REGISTRY_USER: ${{ secrets.MAAL_REGISTRY_USER }}
|
||||||
MAAL_REGISTRY_PASSWORD: ${{ secret.MAAL_REGISTRY_PASSWORD }}
|
MAAL_REGISTRY_PASSWORD: ${{ secrets.MAAL_REGISTRY_PASSWORD }}
|
||||||
MAAL_SSH_PRIVATE_KEY: ${{ secret.MAAL_SSH_PRIVATE_KEY }}
|
MAAL_SSH_PRIVATE_KEY: ${{ secrets.MAAL_SSH_PRIVATE_KEY }}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Pull Git Repo with Code
|
- name: Pull Git Repo with Code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Generate version
|
- name: Generate version
|
||||||
run: echo "VERSION=$(date +%Y%d%m_%H%M)" >> $GITHUB_ENV
|
run: |
|
||||||
|
VERSION=$(date +%Y%d%m_%H%M)
|
||||||
|
GIT_SHA=$(git rev-parse --short HEAD)
|
||||||
|
|
||||||
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
||||||
|
echo "GIT_SHA=$GIT_SHA" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
echo "Version: $VERSION Commit:$GIT_SHA" > public/VERSION
|
||||||
|
|
||||||
- name: Login to registry
|
- name: Login to registry
|
||||||
run: echo "${{ env.MAAL_REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY_ADDRESS }} -u ${{ env.MAAL_REGISTRY_USER }} --password-stdin
|
run: |
|
||||||
|
echo "${{ secrets.MAAL_REGISTRY_PASSWORD }}" | docker login registry.ma-al.pl \
|
||||||
|
-u "${{ secrets.MAAL_REGISTRY_USER }}" \
|
||||||
|
--password-stdin
|
||||||
|
|
||||||
- name: Build application image
|
- name: Build application image
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
+52
-25
@@ -61,32 +61,59 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- API documentation -->
|
<!-- API documentation -->
|
||||||
<div class="card mt-3">
|
<div class="card mt-3">
|
||||||
<div class="card-body d-flex align-items-center justify-content-between">
|
<div class="card-body d-flex align-items-center justify-content-between">
|
||||||
<div>
|
<div>
|
||||||
<h6 class="fw-semibold mb-1"><i class="bi bi-book me-1"></i>API Documentation</h6>
|
<h6 class="fw-semibold mb-1"><i class="bi bi-book me-1"></i>API Documentation</h6>
|
||||||
<p class="text-muted small mb-0">OpenAPI reference for the Check List backend endpoints.</p>
|
<p class="text-muted small mb-0">OpenAPI reference for the Check List backend endpoints.</p>
|
||||||
</div>
|
</div>
|
||||||
<a href="/api-docs" target="_blank" class="btn btn-outline-secondary btn-sm">View docs</a>
|
<a href="/api-docs" target="_blank" class="btn btn-outline-secondary btn-sm">View docs</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<!-- Version info -->
|
||||||
|
<div class="card mt-3">
|
||||||
|
<div class="card-body">
|
||||||
|
<div id="versionInfo" class="text-center text-muted small">
|
||||||
|
Loading version...
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</main>
|
</main>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
(function() {
|
(function() {
|
||||||
// Cleanup button
|
// Cleanup button
|
||||||
document.getElementById('cleanupBtn').addEventListener('click', () => {
|
document.getElementById('cleanupBtn').addEventListener('click', () => {
|
||||||
if (!confirm('This will remove ALL application data (cached data, settings). Continue?')) return;
|
if (!confirm('This will remove ALL application data (cached data, settings). Continue?')) return;
|
||||||
localStorage.removeItem('user_language');
|
localStorage.removeItem('user_language');
|
||||||
// Clear IndexedDB
|
// Clear IndexedDB
|
||||||
indexedDB.databases().then(dbs => {
|
indexedDB.databases().then(dbs => {
|
||||||
dbs.forEach(db => indexedDB.deleteDatabase(db.name));
|
dbs.forEach(db => indexedDB.deleteDatabase(db.name));
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
alert('All data cleared. Page will reload.');
|
alert('All data cleared. Page will reload.');
|
||||||
location.reload();
|
location.reload();
|
||||||
});
|
});
|
||||||
})();
|
})();
|
||||||
</script>
|
|
||||||
|
// Fetch and display version
|
||||||
|
fetch('/VERSION')
|
||||||
|
.then(response => {
|
||||||
|
if (!response.ok) {
|
||||||
|
throw new Error('Network response was not ok');
|
||||||
|
}
|
||||||
|
return response.text();
|
||||||
|
})
|
||||||
|
.then(versionText => {
|
||||||
|
const versionInfo = document.getElementById('versionInfo');
|
||||||
|
versionInfo.textContent = versionText.trim() || 'Version not available';
|
||||||
|
})
|
||||||
|
.catch(error => {
|
||||||
|
console.error('Could not load version:', error);
|
||||||
|
const versionInfo = document.getElementById('versionInfo');
|
||||||
|
versionInfo.textContent = 'Version not available';
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user