Skip to content

Commit 57ea33b

Browse files
authored
Merge pull request #50 from linuxserver/3.22
2 parents 5aaed2d + a7bad13 commit 57ea33b

File tree

13 files changed

+66
-41
lines changed

13 files changed

+66
-41
lines changed

.editorconfig

100755100644
File mode changed.

.github/workflows/call_issue_pr_tracker.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
pull_request_review:
99
types: [submitted,edited,dismissed]
1010

11+
permissions:
12+
contents: read
13+
1114
jobs:
1215
manage-project:
1316
permissions:

.github/workflows/call_issues_cron.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ on:
44
- cron: '20 6 * * *'
55
workflow_dispatch:
66

7+
permissions:
8+
contents: read
9+
710
jobs:
811
stale:
912
permissions:

.github/workflows/external_trigger.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ name: External Trigger Main
33
on:
44
workflow_dispatch:
55

6+
permissions:
7+
contents: read
8+
69
jobs:
710
external-trigger-main:
811
runs-on: ubuntu-latest
@@ -43,8 +46,8 @@ jobs:
4346
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
4447
exit 1
4548
fi
46-
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
47-
echo "External version: \`${EXT_RELEASE}\`" >> $GITHUB_STEP_SUMMARY
49+
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
50+
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
4851
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
4952
image="linuxserver/speedtest-tracker"
5053
tag="latest"
@@ -100,8 +103,8 @@ jobs:
100103
exit 1
101104
fi
102105
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
103-
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
104-
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
106+
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
107+
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
105108
exit 0
106109
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-speedtest-tracker/job/main/lastBuild/api/json | jq -r '.building') == "true" ]; then
107110
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
@@ -116,7 +119,7 @@ jobs:
116119
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
117120
else
118121
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
119-
echo "New version \`${EXT_RELEASE}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
122+
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
120123
if [[ "${artifacts_found}" == "true" ]]; then
121124
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
122125
fi
@@ -136,7 +139,7 @@ jobs:
136139
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
137140
--data-urlencode "Submit=Submit"
138141
echo "**** Notifying Discord ****"
139-
TRIGGER_REASON="A version change was detected for speedtest-tracker tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
142+
TRIGGER_REASON="A version change was detected for speedtest-tracker tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
140143
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
141144
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
142145
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/external_trigger_scheduler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: '56 * * * *'
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
external-trigger-scheduler:
1013
runs-on: ubuntu-latest

.github/workflows/greetings.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,14 @@ name: Greetings
22

33
on: [pull_request_target, issues]
44

5+
permissions:
6+
contents: read
7+
58
jobs:
69
greeting:
10+
permissions:
11+
issues: write
12+
pull-requests: write
713
runs-on: ubuntu-latest
814
steps:
915
- uses: actions/first-interaction@v1

.github/workflows/package_trigger_scheduler.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
- cron: '0 21 * * 6'
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
811
jobs:
912
package-trigger-scheduler:
1013
runs-on: ubuntu-latest

Dockerfile

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.21
3+
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:3.22
44

55
ARG BUILD_DATE
66
ARG VERSION
@@ -13,15 +13,15 @@ ENV HOME=/config
1313
RUN \
1414
apk add --no-cache \
1515
grep \
16-
php83-gd \
17-
php83-intl \
18-
php83-pdo_mysql \
19-
php83-pdo_pgsql \
20-
php83-pdo_sqlite \
21-
php83-pecl-redis \
22-
php83-tokenizer \
23-
php83-xmlreader \
24-
postgresql15-client \
16+
php84-gd \
17+
php84-intl \
18+
php84-pdo_mysql \
19+
php84-pdo_pgsql \
20+
php84-pdo_sqlite \
21+
php84-pecl-redis \
22+
php84-tokenizer \
23+
php84-xmlreader \
24+
postgresql16-client \
2525
ssmtp && \
2626
apk add --no-cache --virtual=build-dependencies \
2727
npm && \
@@ -38,9 +38,9 @@ RUN \
3838
/tmp/speedtest-cli.tgz -C \
3939
/usr/bin && \
4040
echo "**** configure php-fpm to pass env vars ****" && \
41-
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php83/php-fpm.d/www.conf && \
42-
grep -qxF 'clear_env = no' /etc/php83/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php83/php-fpm.d/www.conf && \
43-
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php83/php-fpm.conf && \
41+
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php84/php-fpm.d/www.conf && \
42+
grep -qxF 'clear_env = no' /etc/php84/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php84/php-fpm.d/www.conf && \
43+
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php84/php-fpm.conf && \
4444
echo "*** install speedtest-tracker ***" && \
4545
if [ -z ${SPEEDTEST_TRACKER_VERSION+x} ]; then \
4646
SPEEDTEST_TRACKER_VERSION=$(curl -sX GET "https://api.github.com/repos/alexjustesen/speedtest-tracker/releases/latest" \
@@ -64,12 +64,12 @@ RUN \
6464
echo "**** setup php opcache ****" && \
6565
{ \
6666
echo 'opcache.enable_cli=1'; \
67-
} > /etc/php83/conf.d/opcache-recommended.ini; \
67+
} > /etc/php84/conf.d/opcache-recommended.ini; \
6868
{ \
6969
echo 'post_max_size = 100M'; \
7070
echo 'upload_max_filesize = 100M'; \
7171
echo 'variables_order = EGPCS'; \
72-
} > /etc/php83/conf.d/php-misc.ini && \
72+
} > /etc/php84/conf.d/php-misc.ini && \
7373
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
7474
echo "**** cleanup ****" && \
7575
apk del --purge build-dependencies && \

Dockerfile.aarch64

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# syntax=docker/dockerfile:1
22

3-
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.21
3+
FROM ghcr.io/linuxserver/baseimage-alpine-nginx:arm64v8-3.22
44

55
ARG BUILD_DATE
66
ARG VERSION
@@ -13,15 +13,15 @@ ENV HOME=/config
1313
RUN \
1414
apk add --no-cache \
1515
grep \
16-
php83-gd \
17-
php83-intl \
18-
php83-pdo_mysql \
19-
php83-pdo_pgsql \
20-
php83-pdo_sqlite \
21-
php83-pecl-redis \
22-
php83-tokenizer \
23-
php83-xmlreader \
24-
postgresql15-client \
16+
php84-gd \
17+
php84-intl \
18+
php84-pdo_mysql \
19+
php84-pdo_pgsql \
20+
php84-pdo_sqlite \
21+
php84-pecl-redis \
22+
php84-tokenizer \
23+
php84-xmlreader \
24+
postgresql16-client \
2525
ssmtp && \
2626
apk add --no-cache --virtual=build-dependencies \
2727
npm && \
@@ -38,9 +38,9 @@ RUN \
3838
/tmp/speedtest-cli.tgz -C \
3939
/usr/bin && \
4040
echo "**** configure php-fpm to pass env vars ****" && \
41-
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php83/php-fpm.d/www.conf && \
42-
grep -qxF 'clear_env = no' /etc/php83/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php83/php-fpm.d/www.conf && \
43-
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php83/php-fpm.conf && \
41+
sed -E -i 's/^;?clear_env ?=.*$/clear_env = no/g' /etc/php84/php-fpm.d/www.conf && \
42+
grep -qxF 'clear_env = no' /etc/php84/php-fpm.d/www.conf || echo 'clear_env = no' >> /etc/php84/php-fpm.d/www.conf && \
43+
echo "env[PATH] = /usr/local/bin:/usr/bin:/bin" >> /etc/php84/php-fpm.conf && \
4444
echo "*** install speedtest-tracker ***" && \
4545
if [ -z ${SPEEDTEST_TRACKER_VERSION+x} ]; then \
4646
SPEEDTEST_TRACKER_VERSION=$(curl -sX GET "https://api.github.com/repos/alexjustesen/speedtest-tracker/releases/latest" \
@@ -64,12 +64,12 @@ RUN \
6464
echo "**** setup php opcache ****" && \
6565
{ \
6666
echo 'opcache.enable_cli=1'; \
67-
} > /etc/php83/conf.d/opcache-recommended.ini; \
67+
} > /etc/php84/conf.d/opcache-recommended.ini; \
6868
{ \
6969
echo 'post_max_size = 100M'; \
7070
echo 'upload_max_filesize = 100M'; \
7171
echo 'variables_order = EGPCS'; \
72-
} > /etc/php83/conf.d/php-misc.ini && \
72+
} > /etc/php84/conf.d/php-misc.ini && \
7373
printf "Linuxserver.io version: ${VERSION}\nBuild-date: ${BUILD_DATE}" > /build_version && \
7474
echo "**** cleanup ****" && \
7575
apk del --purge build-dependencies && \

Jenkinsfile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ pipeline {
9797
env.DOCKERHUB_LINK = 'https://hub.docker.com/r/' + env.DOCKERHUB_IMAGE + '/tags/'
9898
env.PULL_REQUEST = env.CHANGE_ID
9999
env.TEMPLATED_FILES = 'Jenkinsfile README.md LICENSE .editorconfig ./.github/CONTRIBUTING.md ./.github/FUNDING.yml ./.github/ISSUE_TEMPLATE/config.yml ./.github/ISSUE_TEMPLATE/issue.bug.yml ./.github/ISSUE_TEMPLATE/issue.feature.yml ./.github/PULL_REQUEST_TEMPLATE.md ./.github/workflows/external_trigger_scheduler.yml ./.github/workflows/greetings.yml ./.github/workflows/package_trigger_scheduler.yml ./.github/workflows/call_issue_pr_tracker.yml ./.github/workflows/call_issues_cron.yml ./.github/workflows/permissions.yml ./.github/workflows/external_trigger.yml ./root/donate.txt'
100+
if ( env.SYFT_IMAGE_TAG == null ) {
101+
env.SYFT_IMAGE_TAG = 'latest'
102+
}
100103
}
104+
echo "Using syft image tag ${SYFT_IMAGE_TAG}"
101105
sh '''#! /bin/bash
102106
echo "The default github branch detected as ${GH_DEFAULT_BRANCH}" '''
103107
script{
@@ -790,7 +794,7 @@ pipeline {
790794
docker run --rm \
791795
-v /var/run/docker.sock:/var/run/docker.sock:ro \
792796
-v ${TEMPDIR}:/tmp \
793-
ghcr.io/anchore/syft:v1.26.1 \
797+
ghcr.io/anchore/syft:${SYFT_IMAGE_TAG} \
794798
${LOCAL_CONTAINER} -o table=/tmp/package_versions.txt
795799
NEW_PACKAGE_TAG=$(md5sum ${TEMPDIR}/package_versions.txt | cut -c1-8 )
796800
echo "Package tag sha from current packages in buit container is ${NEW_PACKAGE_TAG} comparing to old ${PACKAGE_TAG} from github"
@@ -900,6 +904,7 @@ pipeline {
900904
-e WEB_AUTH=\"${CI_AUTH}\" \
901905
-e WEB_PATH=\"${CI_WEBPATH}\" \
902906
-e NODE_NAME=\"${NODE_NAME}\" \
907+
-e SYFT_IMAGE_TAG=\"${CI_SYFT_IMAGE_TAG:-${SYFT_IMAGE_TAG}}\" \
903908
-t ghcr.io/linuxserver/ci:latest \
904909
python3 test_build.py'''
905910
}

0 commit comments

Comments
 (0)