Skip to content

Commit

Permalink
Merge pull request #1370 from xibosignage/develop
Browse files Browse the repository at this point in the history
Release 3.1.1
  • Loading branch information
dasgarner authored Apr 12, 2022
2 parents e74a36d + fec594b commit b67583c
Show file tree
Hide file tree
Showing 52 changed files with 11,613 additions and 11,329 deletions.
42 changes: 11 additions & 31 deletions .github/workflows/build-container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ on:
branches:
- master
- develop
- release22
- release23
- release30
release:
types: [published]
- release31

jobs:
build:
Expand All @@ -22,41 +19,24 @@ jobs:
with:
fetch-depth: 1

# Latest
- name: Build Latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master'
run: |
docker build . -t xibosignage/xibo-cms:latest --build-arg GIT_COMMIT=${GITHUB_SHA}
- name: Build Branch
if: github.event_name == 'push' && github.ref != 'refs/heads/master'
run: |
docker build . -t xibosignage/xibo-cms:${GITHUB_REF##*/} --build-arg GIT_COMMIT=${GITHUB_SHA}
- name: Push Latest
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
if: github.ref == 'refs/heads/master'
run: |
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_TOKEN }}
docker push xibosignage/xibo-cms:latest
- name: Push Branch
if: github.event_name == 'push' && github.ref != 'refs/heads/master'
run: |
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_TOKEN }}
docker push xibosignage/xibo-cms:${GITHUB_REF##*/}
- name: Build Release
if: github.event_name == 'release'
# Release branch
- name: Build Branch
if: github.ref != 'refs/heads/master'
run: |
docker build . -t xibosignage/xibo-cms:release-${GITHUB_REF##*/} --build-arg GIT_COMMIT=${GITHUB_SHA}
- name: Push Release
if: github.event_name == 'release'
docker build . -t xibosignage/xibo-cms:${GITHUB_REF##*/} --build-arg GIT_COMMIT=${GITHUB_SHA}
- name: Push Branch
if: github.ref != 'refs/heads/master'
run: |
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_TOKEN }}
docker push xibosignage/xibo-cms:release-${GITHUB_REF##*/}
in_fork:
name: Skip in a fork
runs-on: ubuntu-18.04
if: github.repository != 'xibosignage/xibo-cms'
steps:
- name: Skip
run: |
echo 'Skipped while in a fork'
docker push xibosignage/xibo-cms:${GITHUB_REF##*/}
41 changes: 41 additions & 0 deletions .github/workflows/build-tag.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build Tag

on:
push:
tags:
- '*'

jobs:
build:
name: Build Containers
if: github.repository == 'xibosignage/xibo-cms'
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Build Image
run: |
docker build . -t xibosignage/xibo-cms:release-${GITHUB_REF##*/} --build-arg GIT_COMMIT=${GITHUB_SHA}
- name: Push Image
run: |
docker login --username ${{ secrets.DOCKER_HUB_USERNAME }} --password ${{ secrets.DOCKER_HUB_TOKEN }}
docker push xibosignage/xibo-cms:release-${GITHUB_REF##*/}
- name: Build archive
run: |
CONTAINER=$(docker create xibosignage/xibo-cms:release-${GITHUB_REF##*/})
echo 'Copying from container.'
docker cp "$CONTAINER":/var/www/cms/ xibo-cms-${GITHUB_REF##*/}
tar -czf xibo-cms-${GITHUB_REF##*/}.tar.gz xibo-cms-${GITHUB_REF##*/}
zip -rq xibo-cms-${GITHUB_REF##*/}.zip xibo-cms-${GITHUB_REF##*/}
echo 'Added to archives.'
docker rm "$CONTAINER"
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: true
fail_on_unmatched_files: true
files: |
**.tar.gz
**.zip
6 changes: 5 additions & 1 deletion bin/run.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@
$app->add(new \Xibo\Middleware\Xmr($app));

$app->addRoutingMiddleware();
$errorMiddleware = $app->addErrorMiddleware(true, true, true);
$errorMiddleware = $app->addErrorMiddleware(
\Xibo\Helper\Environment::isDevMode() || \Xibo\Helper\Environment::isForceDebugging(),
true,
true
);
$errorMiddleware->setDefaultErrorHandler(\Xibo\Middleware\Handlers::jsonErrorHandler($container));

// All routes
Expand Down
Loading

0 comments on commit b67583c

Please sign in to comment.