Skip to content

Commit 6aa0d62

Browse files
authored
Merge pull request #109 from linuxserver/3.22
2 parents 52c9f53 + ce0b88b commit 6aa0d62

20 files changed

+43
-18
lines changed

.editorconfig

100755100644
File mode changed.

.github/CONTRIBUTING.md

100755100644
File mode changed.

.github/FUNDING.yml

100755100644
File mode changed.

.github/ISSUE_TEMPLATE/config.yml

100755100644
File mode changed.

.github/ISSUE_TEMPLATE/issue.bug.yml

100755100644
File mode changed.

.github/ISSUE_TEMPLATE/issue.feature.yml

100755100644
File mode changed.

.github/workflows/call_issue_pr_tracker.yml

100755100644
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

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

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

.github/workflows/external_trigger.yml

100755100644
Lines changed: 11 additions & 8 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-master:
811
runs-on: ubuntu-latest
@@ -26,7 +29,7 @@ jobs:
2629
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
2730
echo "> External trigger running off of master branch. To disable this trigger, add \`openssh-server_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
2831
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
29-
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
32+
EXT_RELEASE=$(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/x86_64/APKINDEX.tar.gz" | tar -xz -C /tmp \
3033
&& awk '/^P:'"openssh-server-pam"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')
3134
echo "Type is \`alpine_repo\`" >> $GITHUB_STEP_SUMMARY
3235
if grep -q "^openssh-server_master_${EXT_RELEASE}" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
@@ -44,8 +47,8 @@ jobs:
4447
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
4548
exit 1
4649
fi
47-
EXT_RELEASE=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
48-
echo "External version: \`${EXT_RELEASE}\`" >> $GITHUB_STEP_SUMMARY
50+
EXT_RELEASE_SANITIZED=$(echo ${EXT_RELEASE} | sed 's/[~,%@+;:/]//g')
51+
echo "Sanitized external version: \`${EXT_RELEASE_SANITIZED}\`" >> $GITHUB_STEP_SUMMARY
4952
echo "Retrieving last pushed version" >> $GITHUB_STEP_SUMMARY
5053
image="linuxserver/openssh-server"
5154
tag="latest"
@@ -101,10 +104,10 @@ jobs:
101104
exit 1
102105
fi
103106
echo "Last pushed version: \`${IMAGE_VERSION}\`" >> $GITHUB_STEP_SUMMARY
104-
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
105-
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
107+
if [ "${EXT_RELEASE_SANITIZED}" == "${IMAGE_VERSION}" ]; then
108+
echo "Sanitized version \`${EXT_RELEASE_SANITIZED}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
106109
exit 0
107-
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.21/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"openssh-server-pam"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
110+
elif [[ $(curl -sL "http://dl-cdn.alpinelinux.org/alpine/v3.22/main/aarch64/APKINDEX.tar.gz" | tar -xz -C /tmp && awk '/^P:'"openssh-server-pam"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://') != "${EXT_RELEASE}" ]]; then
108111
echo "New version \`${EXT_RELEASE}\` found; but not all arch repos updated yet; exiting" >> $GITHUB_STEP_SUMMARY
109112
FAILURE_REASON="New version ${EXT_RELEASE} for openssh-server tag latest is detected, however not all arch repos are updated yet. Will try again later."
110113
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
@@ -124,7 +127,7 @@ jobs:
124127
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}
125128
else
126129
printf "\n## Trigger new build\n\n" >> $GITHUB_STEP_SUMMARY
127-
echo "New version \`${EXT_RELEASE}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
130+
echo "New sanitized version \`${EXT_RELEASE_SANITIZED}\` found; old version was \`${IMAGE_VERSION}\`. Triggering new build" >> $GITHUB_STEP_SUMMARY
128131
if [[ "${artifacts_found}" == "true" ]]; then
129132
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
130133
fi
@@ -144,7 +147,7 @@ jobs:
144147
--data-urlencode "description=GHA external trigger https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}" \
145148
--data-urlencode "Submit=Submit"
146149
echo "**** Notifying Discord ****"
147-
TRIGGER_REASON="A version change was detected for openssh-server tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE}"
150+
TRIGGER_REASON="A version change was detected for openssh-server tag latest. Old version:${IMAGE_VERSION} New version:${EXT_RELEASE_SANITIZED}"
148151
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 9802903,
149152
"description": "**Build Triggered** \n**Reason:** '"${TRIGGER_REASON}"' \n**Build URL:** '"${buildurl}display/redirect"' \n"}],
150153
"username": "Github Actions"}' ${{ secrets.DISCORD_WEBHOOK }}

.github/workflows/external_trigger_scheduler.yml

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

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

0 commit comments

Comments
 (0)