Compare commits
1 Commits
dev
..
be7017736d
| Author | SHA1 | Date | |
|---|---|---|---|
| be7017736d |
@@ -14,29 +14,19 @@ jobs:
|
||||
env:
|
||||
REGISTRY_ADDRESS: registry.ma-al.pl
|
||||
DOCKER_APP_NAME: cl-project
|
||||
MAAL_REGISTRY_USER: ${{ secrets.MAAL_REGISTRY_USER }}
|
||||
MAAL_REGISTRY_PASSWORD: ${{ secrets.MAAL_REGISTRY_PASSWORD }}
|
||||
MAAL_SSH_PRIVATE_KEY: ${{ secrets.MAAL_SSH_PRIVATE_KEY }}
|
||||
MAAL_REGISTRY_USER: ${{ secret.MAAL_REGISTRY_USER }}
|
||||
MAAL_REGISTRY_PASSWORD: ${{ secret.MAAL_REGISTRY_PASSWORD }}
|
||||
MAAL_SSH_PRIVATE_KEY: ${{ secret.MAAL_SSH_PRIVATE_KEY }}
|
||||
|
||||
steps:
|
||||
- name: Pull Git Repo with Code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Generate version
|
||||
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
|
||||
run: echo "VERSION=$(date +%Y%d%m_%H%M)" >> $GITHUB_ENV
|
||||
|
||||
- name: Login to registry
|
||||
run: |
|
||||
echo "${{ secrets.MAAL_REGISTRY_PASSWORD }}" | docker login registry.ma-al.pl \
|
||||
-u "${{ secrets.MAAL_REGISTRY_USER }}" \
|
||||
--password-stdin
|
||||
run: echo "${{ env.MAAL_REGISTRY_PASSWORD }}" | docker login ${{ env.REGISTRY_ADDRESS }} -u ${{ env.MAAL_REGISTRY_USER }} --password-stdin
|
||||
|
||||
- name: Build application image
|
||||
run: |
|
||||
|
||||
+25
-52
@@ -61,59 +61,32 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- API documentation -->
|
||||
<div class="card mt-3">
|
||||
<div class="card-body d-flex align-items-center justify-content-between">
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
<a href="/api-docs" target="_blank" class="btn btn-outline-secondary btn-sm">View docs</a>
|
||||
</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>
|
||||
<!-- API documentation -->
|
||||
<div class="card mt-3">
|
||||
<div class="card-body d-flex align-items-center justify-content-between">
|
||||
<div>
|
||||
<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>
|
||||
</div>
|
||||
<a href="/api-docs" target="_blank" class="btn btn-outline-secondary btn-sm">View docs</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
|
||||
<script>
|
||||
(function() {
|
||||
// Cleanup button
|
||||
document.getElementById('cleanupBtn').addEventListener('click', () => {
|
||||
if (!confirm('This will remove ALL application data (cached data, settings). Continue?')) return;
|
||||
localStorage.removeItem('user_language');
|
||||
// Clear IndexedDB
|
||||
indexedDB.databases().then(dbs => {
|
||||
dbs.forEach(db => indexedDB.deleteDatabase(db.name));
|
||||
}).catch(() => {});
|
||||
alert('All data cleared. Page will reload.');
|
||||
location.reload();
|
||||
});
|
||||
})();
|
||||
|
||||
// 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>
|
||||
<script>
|
||||
(function() {
|
||||
// Cleanup button
|
||||
document.getElementById('cleanupBtn').addEventListener('click', () => {
|
||||
if (!confirm('This will remove ALL application data (cached data, settings). Continue?')) return;
|
||||
localStorage.removeItem('user_language');
|
||||
// Clear IndexedDB
|
||||
indexedDB.databases().then(dbs => {
|
||||
dbs.forEach(db => indexedDB.deleteDatabase(db.name));
|
||||
}).catch(() => {});
|
||||
alert('All data cleared. Page will reload.');
|
||||
location.reload();
|
||||
});
|
||||
})();
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user