File tree Expand file tree Collapse file tree 7 files changed +67
-6
lines changed
Expand file tree Collapse file tree 7 files changed +67
-6
lines changed Original file line number Diff line number Diff line change 66 - master
77 - develop
88
9- release :
10- types : [ published ]
11-
129 workflow_dispatch :
1310
1411jobs :
Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff line change 11vendor /
22.idea /
3+ bin /xmr.phar
34config.json
Original file line number Diff line number Diff line change @@ -2,6 +2,10 @@ FROM composer AS composer
22COPY . /app
33RUN 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+
59FROM php:8.2-cli
610LABEL org.opencontainers.image.authors="Xibo Signage Ltd <info@xibosignage.com>"
711
@@ -33,6 +37,7 @@ EXPOSE 8080 8081 9505
3337COPY ./entrypoint.sh /entrypoint.sh
3438COPY . /opt/xmr
3539COPY --from=composer /app/vendor /opt/xmr/vendor
40+ COPY --from=composer /app/bin /opt/xmr/bin
3641
3742RUN chown -R nobody /opt/xmr && chmod 755 /entrypoint.sh
3843
Original file line number Diff line number Diff line change 11# Introduction
22Xibo - 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
55This 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
Original file line number Diff line number Diff line change 1212 ],
1313 "main" : " index.php" ,
1414 "output" : " bin/xmr.phar" ,
15- "stub" : true
15+ "stub" : true ,
16+ "force-autodiscovery" : true
1617}
You can’t perform that action at this time.
0 commit comments