Skip to content

chore: update lambda dockerfile workflow to support .NET 9 #1905

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 53 additions & 35 deletions .github/workflows/update-Dockerfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,32 +18,32 @@ on:
description: ".NET 6 Next Version"
type: string
required: true
NET_7_AMD64:
description: ".NET 7 AMD64"
NET_8_AMD64:
description: ".NET 8 AMD64"
type: boolean
required: true
default: "true"
NET_7_ARM64:
description: ".NET 7 ARM64"
NET_8_ARM64:
description: ".NET 8 ARM64"
type: boolean
required: true
default: "true"
NET_7_NEXT_VERSION:
description: ".NET 7 Next Version"
NET_8_NEXT_VERSION:
description: ".NET 8 Next Version"
type: string
required: true
NET_8_AMD64:
description: ".NET 8 AMD64"
NET_9_AMD64:
description: ".NET 9 AMD64"
type: boolean
required: true
default: "true"
NET_8_ARM64:
description: ".NET 8 ARM64"
NET_9_ARM64:
description: ".NET 9 ARM64"
type: boolean
required: true
default: "true"
NET_8_NEXT_VERSION:
description: ".NET 8 Next Version"
NET_9_NEXT_VERSION:
description: ".NET 9 Next Version"
type: string
required: true

Expand All @@ -53,10 +53,10 @@ jobs:
env:
NET_6_AMD64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net6/amd64/Dockerfile"
NET_6_ARM64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net6/arm64/Dockerfile"
NET_7_AMD64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net7/amd64/Dockerfile"
NET_7_ARM64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net7/arm64/Dockerfile"
NET_8_AMD64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile"
NET_8_ARM64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile"
NET_9_AMD64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net9/amd64/Dockerfile"
NET_9_ARM64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net9/arm64/Dockerfile"

# Steps represent a sequence of tasks that will be executed as part of the job
steps:
Expand All @@ -68,45 +68,63 @@ jobs:
- name: Update .NET 6 AMD64
id: update-net6-amd64
shell: pwsh
env:
DOCKERFILE_PATH: ${{ env.NET_6_AMD64_Dockerfile }}
NEXT_VERSION: ${{ github.event.inputs.NET_6_NEXT_VERSION }}
run: |
.\LambdaRuntimeDockerfiles/update-dockerfile.ps1 -DockerfilePath ${{ env.NET_6_AMD64_Dockerfile }} -NextVersion ${{ github.event.inputs.NET_6_NEXT_VERSION }}
.\LambdaRuntimeDockerfiles\update-dockerfile.ps1 -DockerfilePath "$DOCKERFILE_PATH" -NextVersion "$NEXT_VERSION"
if: ${{ github.event.inputs.NET_6_AMD64 == 'true' }}

- name: Update .NET 6 ARM64
id: update-net6-arm64
shell: pwsh
env:
DOCKERFILE_PATH: ${{ env.NET_6_ARM64_Dockerfile }}
NEXT_VERSION: ${{ github.event.inputs.NET_6_NEXT_VERSION }}
run: |
.\LambdaRuntimeDockerfiles/update-dockerfile.ps1 -DockerfilePath ${{ env.NET_6_ARM64_Dockerfile }} -NextVersion ${{ github.event.inputs.NET_6_NEXT_VERSION }}
.\LambdaRuntimeDockerfiles\update-dockerfile.ps1 -DockerfilePath "$DOCKERFILE_PATH" -NextVersion "$NEXT_VERSION"
if: ${{ github.event.inputs.NET_6_ARM64 == 'true' }}

- name: Update .NET 7 AMD64
id: update-net7-amd64
shell: pwsh
run: |
.\LambdaRuntimeDockerfiles/update-dockerfile.ps1 -DockerfilePath ${{ env.NET_7_AMD64_Dockerfile }} -NextVersion ${{ github.event.inputs.NET_7_NEXT_VERSION }}
if: ${{ github.event.inputs.NET_7_AMD64 == 'true' }}

- name: Update .NET 7 ARM64
id: update-net7-arm64
shell: pwsh
run: |
.\LambdaRuntimeDockerfiles/update-dockerfile.ps1 -DockerfilePath ${{ env.NET_7_ARM64_Dockerfile }} -NextVersion ${{ github.event.inputs.NET_7_NEXT_VERSION }}
if: ${{ github.event.inputs.NET_7_ARM64 == 'true' }}

- name: Update .NET 8 AMD64
id: update-net8-amd64
shell: pwsh
env:
DOCKERFILE_PATH: ${{ env.NET_8_AMD64_Dockerfile }}
NEXT_VERSION: ${{ github.event.inputs.NET_8_NEXT_VERSION }}
run: |
.\LambdaRuntimeDockerfiles/update-dockerfile.ps1 -DockerfilePath ${{ env.NET_8_AMD64_Dockerfile }} -NextVersion ${{ github.event.inputs.NET_8_NEXT_VERSION }}
.\LambdaRuntimeDockerfiles\update-dockerfile.ps1 -DockerfilePath "$DOCKERFILE_PATH" -NextVersion "$NEXT_VERSION"
if: ${{ github.event.inputs.NET_8_AMD64 == 'true' }}

- name: Update .NET 8 ARM64
id: update-net8-arm64
shell: pwsh
env:
DOCKERFILE_PATH: ${{ env.NET_8_ARM64_Dockerfile }}
NEXT_VERSION: ${{ github.event.inputs.NET_8_NEXT_VERSION }}
run: |
.\LambdaRuntimeDockerfiles/update-dockerfile.ps1 -DockerfilePath ${{ env.NET_8_ARM64_Dockerfile }} -NextVersion ${{ github.event.inputs.NET_8_NEXT_VERSION }}
.\LambdaRuntimeDockerfiles\update-dockerfile.ps1 -DockerfilePath "$DOCKERFILE_PATH" -NextVersion "$NEXT_VERSION"
if: ${{ github.event.inputs.NET_8_ARM64 == 'true' }}

- name: Update .NET 9 AMD64
id: update-net9-amd64
shell: pwsh
env:
DOCKERFILE_PATH: ${{ env.NET_9_AMD64_Dockerfile }}
NEXT_VERSION: ${{ github.event.inputs.NET_9_NEXT_VERSION }}
run: |
.\LambdaRuntimeDockerfiles\update-dockerfile.ps1 -DockerfilePath "$DOCKERFILE_PATH" -NextVersion "$NEXT_VERSION"
if: ${{ github.event.inputs.NET_9_AMD64 == 'true' }}

- name: Update .NET 9 ARM64
id: update-net9-arm64
shell: pwsh
env:
DOCKERFILE_PATH: ${{ env.NET_9_ARM64_Dockerfile }}
NEXT_VERSION: ${{ github.event.inputs.NET_9_NEXT_VERSION }}
run: |
.\LambdaRuntimeDockerfiles\update-dockerfile.ps1 -DockerfilePath "$DOCKERFILE_PATH" -NextVersion "$NEXT_VERSION"
if: ${{ github.event.inputs.NET_9_ARM64 == 'true' }}

# Update Dockerfiles if newer version of ASP.NET Core is available
- name: Commit and Push
id: commit-push
Expand Down Expand Up @@ -140,10 +158,10 @@ jobs:
'{0}\n{1}\n{2}\n{3}\n{4}\n{5}',
join(steps.update-net6-amd64.outputs.MESSAGE, '\n'),
join(steps.update-net6-arm64.outputs.MESSAGE, '\n'),
join(steps.update-net7-amd64.outputs.MESSAGE, '\n'),
join(steps.update-net7-arm64.outputs.MESSAGE, '\n'),
join(steps.update-net8-amd64.outputs.MESSAGE, '\n'),
join(steps.update-net8-arm64.outputs.MESSAGE, '\n')
join(steps.update-net8-arm64.outputs.MESSAGE, '\n'),
join(steps.update-net9-amd64.outputs.MESSAGE, '\n'),
join(steps.update-net9-arm64.outputs.MESSAGE, '\n')
)
}}"
github_token: ${{ secrets.GITHUB_TOKEN }}
Expand Down
Loading