Skip to content

Commit ae2c80d

Browse files
Enhancement: Add pwsh 7.5.0 variants
Signed-off-by: The Oh Brothers Bot <bot@theohbrothers.com>
1 parent b1adddd commit ae2c80d

File tree

9 files changed

+139
-48
lines changed

9 files changed

+139
-48
lines changed

.github/workflows/ci-master-pr.yml

+45-45
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ jobs:
7979

8080
# This step generates the docker tags
8181
- name: Prepare
82-
id: prep-7-4-alpine-3-17
82+
id: prep-7-4-alpine-3-20
8383
run: |
8484
set -e
8585
@@ -92,7 +92,7 @@ jobs:
9292
# Generate docker image tags
9393
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
9494
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
95-
VARIANT="7.4-alpine-3.17"
95+
VARIANT="7.4-alpine-3.20"
9696
REF_VARIANT="${REF}-${VARIANT}"
9797
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
9898
@@ -102,51 +102,51 @@ jobs:
102102
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
103103
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
104104
105-
- name: 7.4-alpine-3.17 - Build (PRs)
105+
- name: 7.4-alpine-3.20 - Build (PRs)
106106
# Run only on pull requests
107107
if: github.event_name == 'pull_request'
108108
uses: docker/build-push-action@v5
109109
with:
110-
context: variants/7.4-alpine-3.17
110+
context: variants/7.4-alpine-3.20
111111
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
112112
push: false
113113
tags: |
114-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17.outputs.REF_VARIANT }}
115-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17.outputs.REF_SHA_VARIANT }}
114+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20.outputs.REF_VARIANT }}
115+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20.outputs.REF_SHA_VARIANT }}
116116
cache-from: type=local,src=/tmp/.buildx-cache
117117
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
118118

119-
- name: 7.4-alpine-3.17 - Build and push (master)
119+
- name: 7.4-alpine-3.20 - Build and push (master)
120120
# Run only on master
121121
if: github.ref == 'refs/heads/master'
122122
uses: docker/build-push-action@v5
123123
with:
124-
context: variants/7.4-alpine-3.17
124+
context: variants/7.4-alpine-3.20
125125
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
126126
push: true
127127
tags: |
128-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17.outputs.REF_VARIANT }}
129-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17.outputs.REF_SHA_VARIANT }}
128+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20.outputs.REF_VARIANT }}
129+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20.outputs.REF_SHA_VARIANT }}
130130
cache-from: type=local,src=/tmp/.buildx-cache
131131
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
132132

133-
- name: 7.4-alpine-3.17 - Build and push (release)
133+
- name: 7.4-alpine-3.20 - Build and push (release)
134134
if: startsWith(github.ref, 'refs/tags/')
135135
uses: docker/build-push-action@v5
136136
with:
137-
context: variants/7.4-alpine-3.17
137+
context: variants/7.4-alpine-3.20
138138
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
139139
push: true
140140
tags: |
141-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17.outputs.VARIANT }}
142-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17.outputs.REF_VARIANT }}
143-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17.outputs.REF_SHA_VARIANT }}
141+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20.outputs.VARIANT }}
142+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20.outputs.REF_VARIANT }}
143+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20.outputs.REF_SHA_VARIANT }}
144144
cache-from: type=local,src=/tmp/.buildx-cache
145145
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
146146

147147
# This step generates the docker tags
148148
- name: Prepare
149-
id: prep-7-4-alpine-3-17-git
149+
id: prep-7-4-alpine-3-20-git
150150
run: |
151151
set -e
152152
@@ -159,7 +159,7 @@ jobs:
159159
# Generate docker image tags
160160
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
161161
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
162-
VARIANT="7.4-alpine-3.17-git"
162+
VARIANT="7.4-alpine-3.20-git"
163163
REF_VARIANT="${REF}-${VARIANT}"
164164
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
165165
@@ -169,51 +169,51 @@ jobs:
169169
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
170170
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
171171
172-
- name: 7.4-alpine-3.17-git - Build (PRs)
172+
- name: 7.4-alpine-3.20-git - Build (PRs)
173173
# Run only on pull requests
174174
if: github.event_name == 'pull_request'
175175
uses: docker/build-push-action@v5
176176
with:
177-
context: variants/7.4-alpine-3.17-git
177+
context: variants/7.4-alpine-3.20-git
178178
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
179179
push: false
180180
tags: |
181-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git.outputs.REF_VARIANT }}
182-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git.outputs.REF_SHA_VARIANT }}
181+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git.outputs.REF_VARIANT }}
182+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git.outputs.REF_SHA_VARIANT }}
183183
cache-from: type=local,src=/tmp/.buildx-cache
184184
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
185185

186-
- name: 7.4-alpine-3.17-git - Build and push (master)
186+
- name: 7.4-alpine-3.20-git - Build and push (master)
187187
# Run only on master
188188
if: github.ref == 'refs/heads/master'
189189
uses: docker/build-push-action@v5
190190
with:
191-
context: variants/7.4-alpine-3.17-git
191+
context: variants/7.4-alpine-3.20-git
192192
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
193193
push: true
194194
tags: |
195-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git.outputs.REF_VARIANT }}
196-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git.outputs.REF_SHA_VARIANT }}
195+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git.outputs.REF_VARIANT }}
196+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git.outputs.REF_SHA_VARIANT }}
197197
cache-from: type=local,src=/tmp/.buildx-cache
198198
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
199199

200-
- name: 7.4-alpine-3.17-git - Build and push (release)
200+
- name: 7.4-alpine-3.20-git - Build and push (release)
201201
if: startsWith(github.ref, 'refs/tags/')
202202
uses: docker/build-push-action@v5
203203
with:
204-
context: variants/7.4-alpine-3.17-git
204+
context: variants/7.4-alpine-3.20-git
205205
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
206206
push: true
207207
tags: |
208-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git.outputs.VARIANT }}
209-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git.outputs.REF_VARIANT }}
210-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git.outputs.REF_SHA_VARIANT }}
208+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git.outputs.VARIANT }}
209+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git.outputs.REF_VARIANT }}
210+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git.outputs.REF_SHA_VARIANT }}
211211
cache-from: type=local,src=/tmp/.buildx-cache
212212
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
213213

214214
# This step generates the docker tags
215215
- name: Prepare
216-
id: prep-7-4-alpine-3-17-git-sops
216+
id: prep-7-4-alpine-3-20-git-sops
217217
run: |
218218
set -e
219219
@@ -226,7 +226,7 @@ jobs:
226226
# Generate docker image tags
227227
# E.g. 'v0.0.0-<variant>' and 'v0.0.0-abc0123-<variant>'
228228
# E.g. 'master-<variant>' and 'master-abc0123-<variant>'
229-
VARIANT="7.4-alpine-3.17-git-sops"
229+
VARIANT="7.4-alpine-3.20-git-sops"
230230
REF_VARIANT="${REF}-${VARIANT}"
231231
REF_SHA_VARIANT="${REF}-${SHA}-${VARIANT}"
232232
@@ -236,45 +236,45 @@ jobs:
236236
echo "REF_VARIANT=$REF_VARIANT" >> $GITHUB_OUTPUT
237237
echo "REF_SHA_VARIANT=$REF_SHA_VARIANT" >> $GITHUB_OUTPUT
238238
239-
- name: 7.4-alpine-3.17-git-sops - Build (PRs)
239+
- name: 7.4-alpine-3.20-git-sops - Build (PRs)
240240
# Run only on pull requests
241241
if: github.event_name == 'pull_request'
242242
uses: docker/build-push-action@v5
243243
with:
244-
context: variants/7.4-alpine-3.17-git-sops
244+
context: variants/7.4-alpine-3.20-git-sops
245245
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
246246
push: false
247247
tags: |
248-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git-sops.outputs.REF_VARIANT }}
249-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git-sops.outputs.REF_SHA_VARIANT }}
248+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git-sops.outputs.REF_VARIANT }}
249+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git-sops.outputs.REF_SHA_VARIANT }}
250250
cache-from: type=local,src=/tmp/.buildx-cache
251251
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
252252

253-
- name: 7.4-alpine-3.17-git-sops - Build and push (master)
253+
- name: 7.4-alpine-3.20-git-sops - Build and push (master)
254254
# Run only on master
255255
if: github.ref == 'refs/heads/master'
256256
uses: docker/build-push-action@v5
257257
with:
258-
context: variants/7.4-alpine-3.17-git-sops
258+
context: variants/7.4-alpine-3.20-git-sops
259259
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
260260
push: true
261261
tags: |
262-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git-sops.outputs.REF_VARIANT }}
263-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git-sops.outputs.REF_SHA_VARIANT }}
262+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git-sops.outputs.REF_VARIANT }}
263+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git-sops.outputs.REF_SHA_VARIANT }}
264264
cache-from: type=local,src=/tmp/.buildx-cache
265265
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
266266

267-
- name: 7.4-alpine-3.17-git-sops - Build and push (release)
267+
- name: 7.4-alpine-3.20-git-sops - Build and push (release)
268268
if: startsWith(github.ref, 'refs/tags/')
269269
uses: docker/build-push-action@v5
270270
with:
271-
context: variants/7.4-alpine-3.17-git-sops
271+
context: variants/7.4-alpine-3.20-git-sops
272272
platforms: linux/386,linux/amd64,linux/arm/v6,linux/arm/v7,linux/arm64,linux/s390x
273273
push: true
274274
tags: |
275-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git-sops.outputs.VARIANT }}
276-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git-sops.outputs.REF_VARIANT }}
277-
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-17-git-sops.outputs.REF_SHA_VARIANT }}
275+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git-sops.outputs.VARIANT }}
276+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git-sops.outputs.REF_VARIANT }}
277+
${{ github.repository }}:${{ steps.prep-7-4-alpine-3-20-git-sops.outputs.REF_SHA_VARIANT }}
278278
cache-from: type=local,src=/tmp/.buildx-cache
279279
cache-to: type=local,dest=/tmp/.buildx-cache-new,mode=max
280280

README.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Dockerized `powershell`, based on [mcr.microsoft.com/powershell](https://hub.doc
1010

1111
| Tag | Dockerfile Build Context |
1212
|:-------:|:---------:|
13-
| `:7.4-alpine-3.17` | [View](variants/7.4-alpine-3.17) |
14-
| `:7.4-alpine-3.17-git` | [View](variants/7.4-alpine-3.17-git) |
15-
| `:7.4-alpine-3.17-git-sops` | [View](variants/7.4-alpine-3.17-git-sops) |
13+
| `:7.4-alpine-3.20` | [View](variants/7.4-alpine-3.20) |
14+
| `:7.4-alpine-3.20-git` | [View](variants/7.4-alpine-3.20-git) |
15+
| `:7.4-alpine-3.20-git-sops` | [View](variants/7.4-alpine-3.20-git-sops) |
1616
| `:7.3-alpine-3.17` | [View](variants/7.3-alpine-3.17) |
1717
| `:7.3-alpine-3.17-git` | [View](variants/7.3-alpine-3.17-git) |
1818
| `:7.3-alpine-3.17-git-sops` | [View](variants/7.3-alpine-3.17-git-sops) |

generate/definitions/versions.json

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
22
"pwsh": {
33
"versions": [
4+
"7.5.0",
45
"7.4.6",
56
"7.3.12",
67
"7.2.24"
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
FROM mcr.microsoft.com/powershell:7.4-alpine-3.20
2+
3+
# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
4+
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
5+
ENV POWERSHELL_TELEMETRY_OPTOUT=1
6+
ENV POWERSHELL_UPDATECHECK=Off
7+
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
8+
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
9+
ENV DOTNET_TELEMETRY_OPTOUT=1
10+
ENV COMPlus_EnableDiagnostics=0
11+
12+
# Install Pester
13+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
14+
15+
RUN apk add --no-cache git
16+
17+
RUN set -eux; \
18+
wget -qO- https://github.com/mozilla/sops/releases/download/v3.7.3/sops-v3.7.3.linux > /usr/local/bin/sops; \
19+
chmod +x /usr/local/bin/sops; \
20+
sha256sum /usr/local/bin/sops | grep '^53aec65e45f62a769ff24b7e5384f0c82d62668dd96ed56685f649da114b4dbb '; \
21+
sops --version
22+
23+
RUN apk add --no-cache gnupg
24+
25+
COPY docker-entrypoint.sh /docker-entrypoint.sh
26+
RUN chmod +x docker-entrypoint.sh
27+
28+
ENTRYPOINT [ "/docker-entrypoint.sh" ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
5+
set -- pwsh "$@"
6+
fi
7+
8+
exec "$@"
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM mcr.microsoft.com/powershell:7.4-alpine-3.20
2+
3+
# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
4+
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
5+
ENV POWERSHELL_TELEMETRY_OPTOUT=1
6+
ENV POWERSHELL_UPDATECHECK=Off
7+
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
8+
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
9+
ENV DOTNET_TELEMETRY_OPTOUT=1
10+
ENV COMPlus_EnableDiagnostics=0
11+
12+
# Install Pester
13+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
14+
15+
RUN apk add --no-cache git
16+
17+
COPY docker-entrypoint.sh /docker-entrypoint.sh
18+
RUN chmod +x docker-entrypoint.sh
19+
20+
ENTRYPOINT [ "/docker-entrypoint.sh" ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
5+
set -- pwsh "$@"
6+
fi
7+
8+
exec "$@"

variants/7.4-alpine-3.20/Dockerfile

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM mcr.microsoft.com/powershell:7.4-alpine-3.20
2+
3+
# Disable telemetry for powershell 7.0.0 and above and .NET core: https://github.com/PowerShell/PowerShell/issues/16234#issuecomment-942139350
4+
ENV POWERSHELL_CLI_TELEMETRY_OPTOUT=1
5+
ENV POWERSHELL_TELEMETRY_OPTOUT=1
6+
ENV POWERSHELL_UPDATECHECK=Off
7+
ENV POWERSHELL_UPDATECHECK_OPTOUT=1
8+
ENV DOTNET_CLI_TELEMETRY_OPTOUT=1
9+
ENV DOTNET_TELEMETRY_OPTOUT=1
10+
ENV COMPlus_EnableDiagnostics=0
11+
12+
# Install Pester
13+
RUN pwsh -c 'Install-Module Pester -Scope AllUsers -MinimumVersion 4.0.0 -MaximumVersion 4.10.1 -Force -ErrorAction Stop -Verbose'
14+
15+
COPY docker-entrypoint.sh /docker-entrypoint.sh
16+
RUN chmod +x docker-entrypoint.sh
17+
18+
ENTRYPOINT [ "/docker-entrypoint.sh" ]
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#!/bin/sh
2+
set -eu
3+
4+
if [ $# -gt 0 ] && [ "${1#-}" != "$1" ]; then
5+
set -- pwsh "$@"
6+
fi
7+
8+
exec "$@"

0 commit comments

Comments
 (0)