Skip to content

Commit 9acddc5

Browse files
authored
Merge pull request #173 from linuxserver/branch-3.20
2 parents d3eccd1 + bf22ec0 commit 9acddc5

File tree

8 files changed

+218
-163
lines changed

8 files changed

+218
-163
lines changed

.github/CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
## Readme
2525

2626
If you would like to change our readme, please __**do not**__ directly edit the readme, as it is auto-generated on each commit.
27-
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-alpine-nginx/edit/master/readme-vars.yml).
27+
Instead edit the [readme-vars.yml](https://github.com/linuxserver/docker-baseimage-alpine-nginx/edit/3.20/readme-vars.yml).
2828

2929
These variables are used in a template for our [Jenkins Builder](https://github.com/linuxserver/docker-jenkins-builder) as part of an ansible play.
3030
Most of these variables are also carried over to [docs.linuxserver.io](https://docs.linuxserver.io)
@@ -115,7 +115,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
115115

116116
## Update the changelog
117117

118-
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-alpine-nginx/tree/master/root), add an entry to the changelog
118+
If you are modifying the Dockerfiles or any of the startup scripts in [root](https://github.com/linuxserver/docker-baseimage-alpine-nginx/tree/3.20/root), add an entry to the changelog
119119

120120
```yml
121121
changelogs:

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
------------------------------
2323

24-
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-alpine-nginx/blob/master/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
24+
- [ ] I have read the [contributing](https://github.com/linuxserver/docker-baseimage-alpine-nginx/blob/3.20/.github/CONTRIBUTING.md) guideline and understand that I have made the correct modifications
2525

2626
------------------------------
2727

.github/workflows/external_trigger.yml

Lines changed: 20 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -4,31 +4,31 @@ on:
44
workflow_dispatch:
55

66
jobs:
7-
external-trigger-master:
7+
external-trigger-3-20:
88
runs-on: ubuntu-latest
99
steps:
1010
- uses: actions/checkout@v4.1.1
1111

1212
- name: External Trigger
13-
if: github.ref == 'refs/heads/master'
13+
if: github.ref == 'refs/heads/3.20'
1414
env:
1515
SKIP_EXTERNAL_TRIGGER: ${{ vars.SKIP_EXTERNAL_TRIGGER }}
1616
run: |
1717
printf "# External trigger for docker-baseimage-alpine-nginx\n\n" >> $GITHUB_STEP_SUMMARY
18-
if grep -q "^baseimage-alpine-nginx_master" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
18+
if grep -q "^baseimage-alpine-nginx_3.20" <<< "${SKIP_EXTERNAL_TRIGGER}"; then
1919
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
20-
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`baseimage-alpine-nginx_master\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
20+
echo "> Github organizational variable \`SKIP_EXTERNAL_TRIGGER\` contains \`baseimage-alpine-nginx_3.20\`; skipping trigger." >> $GITHUB_STEP_SUMMARY
2121
exit 0
2222
fi
2323
echo "> [!NOTE]" >> $GITHUB_STEP_SUMMARY
24-
echo "> External trigger running off of master branch. To disable this trigger, add \`baseimage-alpine-nginx_master\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
24+
echo "> External trigger running off of 3.20 branch. To disable this trigger, add \`baseimage-alpine-nginx_3.20\` into the Github organizational variable \`SKIP_EXTERNAL_TRIGGER\`." >> $GITHUB_STEP_SUMMARY
2525
printf "\n## Retrieving external version\n\n" >> $GITHUB_STEP_SUMMARY
2626
EXT_RELEASE=$(echo $(curl -sL http://dl-cdn.alpinelinux.org/alpine/v3.20/main/x86_64/APKINDEX.tar.gz | tar -xz -C /tmp && awk '/^P:'"nginx"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://')_$(curl -sL http://dl-cdn.alpinelinux.org/alpine/v3.20/community/x86_64/APKINDEX.tar.gz | tar -xz -C /tmp && awk '/^P:'"php83"'$/,/V:/' /tmp/APKINDEX | sed -n 2p | sed 's/^V://'))
2727
echo "Type is \`custom_version_command\`" >> $GITHUB_STEP_SUMMARY
2828
if [ -z "${EXT_RELEASE}" ] || [ "${EXT_RELEASE}" == "null" ]; then
2929
echo "> [!WARNING]" >> $GITHUB_STEP_SUMMARY
3030
echo "> Can't retrieve external version, exiting" >> $GITHUB_STEP_SUMMARY
31-
FAILURE_REASON="Can't retrieve external version for baseimage-alpine-nginx branch master"
31+
FAILURE_REASON="Can't retrieve external version for baseimage-alpine-nginx branch 3.20"
3232
GHA_TRIGGER_URL="https://github.com/linuxserver/docker-baseimage-alpine-nginx/actions/runs/${{ github.run_id }}"
3333
curl -X POST -H "Content-Type: application/json" --data '{"avatar_url": "https://cdn.discordapp.com/avatars/354986384542662657/df91181b3f1cf0ef1592fbe18e0962d7.png","embeds": [{"color": 16711680,
3434
"description": "**Trigger Failed** \n**Reason:** '"${FAILURE_REASON}"' \n**Trigger URL:** '"${GHA_TRIGGER_URL}"' \n"}],
@@ -43,16 +43,18 @@ jobs:
4343
token=$(curl -sX GET \
4444
"https://ghcr.io/token?scope=repository%3Alinuxserver%2Fbaseimage-alpine-nginx%3Apull" \
4545
| jq -r '.token')
46-
multidigest=$(curl -s \
47-
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
48-
--header "Authorization: Bearer ${token}" \
49-
"https://ghcr.io/v2/${image}/manifests/${tag}" \
50-
| jq -r 'first(.manifests[].digest)')
51-
digest=$(curl -s \
52-
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
53-
--header "Authorization: Bearer ${token}" \
54-
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
55-
| jq -r '.config.digest')
46+
multidigest=$(curl -s \
47+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
48+
--header "Accept: application/vnd.oci.image.index.v1+json" \
49+
--header "Authorization: Bearer ${token}" \
50+
"https://ghcr.io/v2/${image}/manifests/${tag}")
51+
multidigest=$(jq -r ".manifests[] | select(.platform.architecture == \"amd64\").digest?" <<< "${multidigest}")
52+
digest=$(curl -s \
53+
--header "Accept: application/vnd.docker.distribution.manifest.v2+json" \
54+
--header "Accept: application/vnd.oci.image.manifest.v1+json" \
55+
--header "Authorization: Bearer ${token}" \
56+
"https://ghcr.io/v2/${image}/manifests/${multidigest}" \
57+
| jq -r '.config.digest')
5658
image_info=$(curl -sL \
5759
--header "Authorization: Bearer ${token}" \
5860
"https://ghcr.io/v2/${image}/blobs/${digest}")
@@ -76,7 +78,7 @@ jobs:
7678
if [ "${EXT_RELEASE}" == "${IMAGE_VERSION}" ]; then
7779
echo "Version \`${EXT_RELEASE}\` already pushed, exiting" >> $GITHUB_STEP_SUMMARY
7880
exit 0
79-
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine-nginx/job/master/lastBuild/api/json | jq -r '.building') == "true" ]; then
81+
elif [ $(curl -s https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine-nginx/job/3.20/lastBuild/api/json | jq -r '.building') == "true" ]; then
8082
echo "New version \`${EXT_RELEASE}\` found; but there already seems to be an active build on Jenkins; exiting" >> $GITHUB_STEP_SUMMARY
8183
exit 0
8284
else
@@ -94,7 +96,7 @@ jobs:
9496
echo "All artifacts seem to be uploaded." >> $GITHUB_STEP_SUMMARY
9597
fi
9698
response=$(curl -iX POST \
97-
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine-nginx/job/master/buildWithParameters?PACKAGE_CHECK=false \
99+
https://ci.linuxserver.io/job/Docker-Pipeline-Builders/job/docker-baseimage-alpine-nginx/job/3.20/buildWithParameters?PACKAGE_CHECK=false \
98100
--user ${{ secrets.JENKINS_USER }}:${{ secrets.JENKINS_TOKEN }} | grep -i location | sed "s|^[L|l]ocation: \(.*\)|\1|")
99101
echo "Jenkins [job queue url](${response%$'\r'})" >> $GITHUB_STEP_SUMMARY
100102
echo "Sleeping 10 seconds until job starts" >> $GITHUB_STEP_SUMMARY

.github/workflows/greetings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ jobs:
99
- uses: actions/first-interaction@v1
1010
with:
1111
issue-message: 'Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.'
12-
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-alpine-nginx/blob/master/.github/PULL_REQUEST_TEMPLATE.md)!'
12+
pr-message: 'Thanks for opening this pull request! Be sure to follow the [pull request template](https://github.com/linuxserver/docker-baseimage-alpine-nginx/blob/3.20/.github/PULL_REQUEST_TEMPLATE.md)!'
1313
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)