77 required : true
88
99env :
10+ VERSION_INPUT : ${{ env.VERSION_INPUT }}
1011 AWS_DEFAULT_REGION : us-east-1
1112 AWS_PUBLIC_ECR_REGION : us-east-1
1213 AWS_PRIVATE_ECR_REGION : us-west-2
9596
9697 - name : Upload to Private S3 Bucket
9798 run : |
98- PREFIX="Release_v${{github.event.inputs.version }}"
99+ PREFIX="Release_v${{ env.VERSION_INPUT }}"
99100
100101 find ./artifacts/ -name "*.zip" | while read file; do
101102 base=$(basename "$file")
@@ -111,27 +112,27 @@ jobs:
111112 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }} # This token is provided by Actions, you do not need to create your own token
112113 run : |
113114 gh release create --target "$GITHUB_REF_NAME" \
114- --title "Release v${{ github.event.inputs.version }}" \
115- "v${{ github.event.inputs.version }}" \
116- --notes "Release Verions v${{ github.event.inputs.version }}"
115+ --title "Release v${{ env.VERSION_INPUT }}" \
116+ "v${{ env.VERSION_INPUT }}" \
117+ --notes "Release Verions v${{ env.VERSION_INPUT }}"
117118
118119 - name : Upload artifacts to release
119120 env :
120121 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
121122 run : |
122- PREFIX="Release_v${{github.event.inputs.version }}_"
123+ PREFIX="Release_v${{ env.VERSION_INPUT }}_"
123124
124125 find ./artifacts/ -name "*.zip" | while read file; do
125126 base=$(basename "$file")
126127 cp "$file" "$base"
127- gh release upload "v${{ github.event.inputs.version }}" \
128+ gh release upload "v${{ env.VERSION_INPUT }}" \
128129 $base \
129130 --clobber
130131 done
131- gh release upload "v${{ github.event.inputs.version }}" \
132+ gh release upload "v${{ env.VERSION_INPUT }}" \
132133 ./installationScripts/aws-otel-dotnet-install.sh \
133134 --clobber
134- gh release upload "v${{ github.event.inputs.version }}" \
135+ gh release upload "v${{ env.VERSION_INPUT }}" \
135136 ./installationScripts/AWS.Otel.DotNet.Auto.psm1 \
136137 --clobber
137138
@@ -234,37 +235,37 @@ jobs:
234235 if : runner.os == 'Linux'
235236 run : |
236237 set -e
237- docker build -t ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-amd64 -f ./Dockerfile.linux .
238- docker push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-amd64
239- docker tag ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-amd64 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-amd64
240- docker push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-amd64
238+ docker build -t ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-amd64 -f ./Dockerfile.linux .
239+ docker push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-amd64
240+ docker tag ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-amd64 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-amd64
241+ docker push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-amd64
241242
242243 - name : Build Linux arm64 container
243244 if : runner.os == 'Linux'
244245 run : |
245246 set -e
246247 cd ./arm64
247- docker build --platform linux/arm64 -t ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-arm64 -f ../Dockerfile.linux .
248- docker push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-arm64
249- docker tag ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-arm64 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-arm64
250- docker push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-arm64
248+ docker build --platform linux/arm64 -t ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-arm64 -f ../Dockerfile.linux .
249+ docker push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-arm64
250+ docker tag ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-arm64 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-arm64
251+ docker push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-arm64
251252
252253 - name : Build Windows container
253254 if : runner.os == 'Windows'
254255 run : |
255256 $osInfo = systeminfo | Select-String "OS Version"
256257 if ($osInfo -match "10.0.17763") {
257258 Echo "Build image for Windows Server 2019"
258- docker build -t ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2019 -f ./Dockerfile.windows2019 .
259- docker push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2019
260- docker tag ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2019 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2019
261- docker push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2019
259+ docker build -t ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2019 -f ./Dockerfile.windows2019 .
260+ docker push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2019
261+ docker tag ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2019 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2019
262+ docker push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2019
262263 } elseif ($osInfo -match "10.0.20348") {
263264 Echo "Build image for Windows Server 2022"
264- docker build -t ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2022 -f ./Dockerfile.windows2022 .
265- docker push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2022
266- docker tag ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2022 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2022
267- docker push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2022
265+ docker build -t ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2022 -f ./Dockerfile.windows2022 .
266+ docker push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2022
267+ docker tag ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2022 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2022
268+ docker push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2022
268269 } else {
269270 Echo "Unknown Windows Server version: $osInfo"
270271 exit 1
@@ -299,15 +300,15 @@ jobs:
299300
300301 - name : Create multi-platform image and push to Amazon private ECR
301302 run : |
302- docker manifest create ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }} ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-amd64 ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-arm64 ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2019 ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2022
303- docker manifest inspect ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
304- docker manifest push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ github.event.inputs.version }}
303+ docker manifest create ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }} ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-amd64 ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-arm64 ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2019 ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2022
304+ docker manifest inspect ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}
305+ docker manifest push ${{ env.RELEASE_PRIVATE_REPOSITORY }}:v${{ env.VERSION_INPUT }}
305306
306307 - name : Create multi-platform image and push to Amazon public ECR
307308 run : |
308- docker manifest create ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }} ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-amd64 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-arm64 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2019 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}-windows2022
309- docker manifest inspect ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
310- docker manifest push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ github.event.inputs.version }}
309+ docker manifest create ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }} ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-amd64 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-arm64 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2019 ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}-windows2022
310+ docker manifest inspect ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}
311+ docker manifest push ${{ env.RELEASE_PUBLIC_REPOSITORY }}:v${{ env.VERSION_INPUT }}
311312
312313 build-release-nuget :
313314 runs-on : windows-latest
@@ -347,7 +348,7 @@ jobs:
347348 run : >
348349 dotnet pack
349350 .\src\AWS.Distro.OpenTelemetry.AutoInstrumentation
350- /p:Version=${{github.event.inputs.version }}
351+ /p:Version=${{ env.VERSION_INPUT }}
351352 --no-build
352353 -c Release
353354 -o .\Deployment\nuget-packages
0 commit comments