Skip to content

Commit 1647fde

Browse files
authored
Merge pull request #48 from xibosignage/develop
Update PHAR file (for new version) (#47)
2 parents b25a002 + 73df0cc commit 1647fde

File tree

7 files changed

+67
-6
lines changed

7 files changed

+67
-6
lines changed

.github/workflows/build.yaml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
- master
77
- develop
88

9-
release:
10-
types: [ published ]
11-
129
workflow_dispatch:
1310

1411
jobs:

.github/workflows/release.yaml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Build Tag
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
name: Build Containers
11+
if: github.repository == 'xibosignage/xibo-xmr'
12+
runs-on: ubuntu-22.04
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 1
18+
19+
- name: Configure Build X
20+
uses: docker/setup-buildx-action@v3
21+
22+
- name: Login to GitHub Container Registry
23+
uses: docker/login-action@v2
24+
with:
25+
registry: ghcr.io
26+
username: ${{ github.actor }}
27+
password: ${{ secrets.GITHUB_TOKEN }}
28+
29+
- name: Build Image
30+
uses: docker/build-push-action@v5
31+
with:
32+
context: .
33+
cache-from: type=gha
34+
cache-to: type=gha,mode=max
35+
tags: ghcr.io/xibosignage/xibo-xmr:${{ github.ref_name }}
36+
build-args: GIT_COMMIT=${{ github.sha }}
37+
push: true
38+
load: false
39+
40+
- name: Pull Image
41+
run: |
42+
docker pull ghcr.io/xibosignage/xibo-xmr:${GITHUB_REF##*/}
43+
44+
- name: Build archive
45+
run: |
46+
CONTAINER=$(docker create ghcr.io/xibosignage/xibo-xmr:${GITHUB_REF##*/})
47+
echo 'Copying PHAR from container.'
48+
docker cp "$CONTAINER":/opt/xmr/bin/xmr.phar xibo-xmr-${GITHUB_REF##*/}
49+
docker rm "$CONTAINER"
50+
51+
- name: Release
52+
uses: softprops/action-gh-release@v1
53+
with:
54+
draft: true
55+
fail_on_unmatched_files: true
56+
files: |
57+
bin/xmr.phar

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
vendor/
22
.idea/
3+
bin/xmr.phar
34
config.json

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ FROM composer AS composer
22
COPY . /app
33
RUN composer install --no-interaction --no-dev --ignore-platform-reqs --optimize-autoloader
44

5+
# Build the PHAR file
6+
RUN echo 'phar.readonly = Off' > /usr/local/etc/php/php.ini;
7+
RUN curl -LSs https://github.com/box-project/box/releases/download/4.2.0/box.phar -o box.phar; php box.phar compile; rm box.phar
8+
59
FROM php:8.2-cli
610
LABEL org.opencontainers.image.authors="Xibo Signage Ltd <info@xibosignage.com>"
711

@@ -33,6 +37,7 @@ EXPOSE 8080 8081 9505
3337
COPY ./entrypoint.sh /entrypoint.sh
3438
COPY . /opt/xmr
3539
COPY --from=composer /app/vendor /opt/xmr/vendor
40+
COPY --from=composer /app/bin /opt/xmr/bin
3641

3742
RUN chown -R nobody /opt/xmr && chmod 755 /entrypoint.sh
3843

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Introduction
22
Xibo - Digital Signage - http://www.xibo.org.uk
3-
Copyright (C) 2006-2022 Xibo Signage Ltd and Contributors.
3+
Copyright (C) 2006-2025 Xibo Signage Ltd and Contributors.
44

55
This is the Xibo Message Relay (XMR) repository.
66

@@ -74,4 +74,4 @@ You should have received a copy of the GNU Affero General Public License along w
7474

7575
#### 3rd Party
7676

77-
We use BOX to package the PHAR file - see https://github.com/box-project/box2
77+
We use BOX to package the PHAR file - see https://github.com/box-project/box2

bin/xmr.phar

-691 KB
Binary file not shown.

box.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,6 @@
1212
],
1313
"main": "index.php",
1414
"output": "bin/xmr.phar",
15-
"stub": true
15+
"stub": true,
16+
"force-autodiscovery": true
1617
}

0 commit comments

Comments
 (0)