Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5b31a1b953 |
@@ -23,7 +23,14 @@ jobs:
|
|||||||
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: |
|
run: |
|
||||||
|
|||||||
@@ -71,6 +71,15 @@
|
|||||||
<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>
|
||||||
@@ -87,6 +96,24 @@
|
|||||||
location.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>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|||||||
Reference in New Issue
Block a user