[docker] set BUILD_TIME/BUILD_HASH vars
This commit is contained in:
parent
89a61d3499
commit
42fc180c25
4 changed files with 13 additions and 4 deletions
8
.github/workflows/publish.yml
vendored
8
.github/workflows/publish.yml
vendored
|
@ -16,7 +16,12 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
|
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' || github.event_name == 'push' }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- name: Checkout
|
||||||
|
uses: actions/checkout@master
|
||||||
|
- name: Set build vars
|
||||||
|
run: |
|
||||||
|
echo "BUILD_TIME=$(date +'%Y-%m-%dT%H:%M:%S')" >> $GITHUB_ENV
|
||||||
|
echo "BUILD_HASH=$GITHUB_SHA" >> $GITHUB_ENV
|
||||||
- name: Publish to Registry
|
- name: Publish to Registry
|
||||||
uses: elgohr/Publish-Docker-Github-Action@main
|
uses: elgohr/Publish-Docker-Github-Action@main
|
||||||
with:
|
with:
|
||||||
|
@ -25,4 +30,5 @@ jobs:
|
||||||
password: ${{ secrets.DOCKER_PASSWORD }}
|
password: ${{ secrets.DOCKER_PASSWORD }}
|
||||||
cache: ${{ github.event_name != 'schedule' }}
|
cache: ${{ github.event_name != 'schedule' }}
|
||||||
buildoptions: "--build-arg RUN_TESTS=false"
|
buildoptions: "--build-arg RUN_TESTS=false"
|
||||||
|
buildargs: BUILD_TIME,BUILD_HASH
|
||||||
tag_semver: true
|
tag_semver: true
|
||||||
|
|
|
@ -53,7 +53,8 @@ EXPOSE 8000
|
||||||
FROM base AS run
|
FROM base AS run
|
||||||
EXPOSE 8000
|
EXPOSE 8000
|
||||||
# HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1
|
# HEALTHCHECK --interval=1m --timeout=3s CMD curl --fail http://127.0.0.1:8000/ || exit 1
|
||||||
ENV UID=1000 GID=1000 UPLOAD_MAX_FILESIZE=50M
|
ARG BUILD_TIME=unknown BUILD_HASH=unknown
|
||||||
|
ENV UID=1000 GID=1000 UPLOAD_MAX_FILESIZE=50M BUILD_TIME=${BUILD_TIME} BUILD_HASH=${BUILD_HASH}
|
||||||
COPY --from=build /app /app
|
COPY --from=build /app /app
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
ENTRYPOINT ["/app/.docker/entrypoint.sh"]
|
ENTRYPOINT ["/app/.docker/entrypoint.sh"]
|
||||||
|
|
|
@ -527,7 +527,7 @@ class BasePage
|
||||||
|
|
||||||
print <<<EOD
|
print <<<EOD
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html class="no-js" lang="en">
|
<html lang="en">
|
||||||
$head_html
|
$head_html
|
||||||
$body_html
|
$body_html
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -21,7 +21,9 @@ function _load_event_listeners(): void
|
||||||
{
|
{
|
||||||
global $_shm_event_listeners;
|
global $_shm_event_listeners;
|
||||||
|
|
||||||
$cache_path = data_path("cache/shm_event_listeners.php");
|
$key = md5(Extension::get_enabled_extensions_as_string());
|
||||||
|
|
||||||
|
$cache_path = data_path("cache/shm_event_listeners.$key.php");
|
||||||
if (SPEED_HAX && file_exists($cache_path)) {
|
if (SPEED_HAX && file_exists($cache_path)) {
|
||||||
require_once($cache_path);
|
require_once($cache_path);
|
||||||
} else {
|
} else {
|
||||||
|
|
Reference in a new issue