Skip to content
Merged
Show file tree
Hide file tree
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
36 changes: 22 additions & 14 deletions .github/workflows/auto-update-Dockerfiles.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Auto-Update Lambda Dockerfiles Daily

permissions:
contents: write
pull-requests: write
permissions: {}

on:
# Run daily at midnight UTC
Expand All @@ -11,9 +9,17 @@ on:
# Allows to run this workflow manually from the Actions tab for testing
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
auto-update:
name: Auto-update Dockerfiles and open PR
runs-on: ubuntu-latest
permissions:
contents: write # to push the daily Dockerfile update branch
pull-requests: write # to open the update PR and label it
env:
NET_8_AMD64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net8/amd64/Dockerfile"
NET_8_ARM64_Dockerfile: "LambdaRuntimeDockerfiles/Images/net8/arm64/Dockerfile"
Expand All @@ -39,7 +45,7 @@ jobs:
run: |
$version = & "./LambdaRuntimeDockerfiles/get-latest-aspnet-versions.ps1" -MajorVersion "8"
if (-not [string]::IsNullOrEmpty($version)) {
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "${{ env.DOCKERFILE_PATH }}" -NextVersion $version
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "$env:DOCKERFILE_PATH" -NextVersion $version
} else {
Write-Host "Skipping .NET 8 AMD64 update - No version detected"
}
Expand All @@ -53,7 +59,7 @@ jobs:
run: |
$version = & "./LambdaRuntimeDockerfiles/get-latest-aspnet-versions.ps1" -MajorVersion "8"
if (-not [string]::IsNullOrEmpty($version)) {
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "${{ env.DOCKERFILE_PATH }}" -NextVersion $version
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "$env:DOCKERFILE_PATH" -NextVersion $version
} else {
Write-Host "Skipping .NET 8 ARM64 update - No version detected"
}
Expand All @@ -67,7 +73,7 @@ jobs:
run: |
$version = & "./LambdaRuntimeDockerfiles/get-latest-aspnet-versions.ps1" -MajorVersion "9"
if (-not [string]::IsNullOrEmpty($version)) {
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "${{ env.DOCKERFILE_PATH }}" -NextVersion $version
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "$env:DOCKERFILE_PATH" -NextVersion $version
} else {
Write-Host "Skipping .NET 9 AMD64 update - No version detected"
}
Expand All @@ -81,7 +87,7 @@ jobs:
run: |
$version = & "./LambdaRuntimeDockerfiles/get-latest-aspnet-versions.ps1" -MajorVersion "9"
if (-not [string]::IsNullOrEmpty($version)) {
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "${{ env.DOCKERFILE_PATH }}" -NextVersion $version
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "$env:DOCKERFILE_PATH" -NextVersion $version
} else {
Write-Host "Skipping .NET 9 ARM64 update - No version detected"
}
Expand All @@ -95,7 +101,7 @@ jobs:
run: |
$version = & "./LambdaRuntimeDockerfiles/get-latest-aspnet-versions.ps1" -MajorVersion "10"
if (-not [string]::IsNullOrEmpty($version)) {
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "${{ env.DOCKERFILE_PATH }}" -NextVersion $version
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "$env:DOCKERFILE_PATH" -NextVersion $version
} else {
Write-Host "Skipping .NET 10 AMD64 update - No version detected"
}
Expand All @@ -109,7 +115,7 @@ jobs:
run: |
$version = & "./LambdaRuntimeDockerfiles/get-latest-aspnet-versions.ps1" -MajorVersion "10"
if (-not [string]::IsNullOrEmpty($version)) {
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "${{ env.DOCKERFILE_PATH }}" -NextVersion $version
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "$env:DOCKERFILE_PATH" -NextVersion $version
} else {
Write-Host "Skipping .NET 10 ARM64 update - No version detected"
}
Expand All @@ -123,7 +129,7 @@ jobs:
run: |
$version = & "./LambdaRuntimeDockerfiles/get-latest-aspnet-versions.ps1" -MajorVersion "11"
if (-not [string]::IsNullOrEmpty($version)) {
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "${{ env.DOCKERFILE_PATH }}" -NextVersion $version
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "$env:DOCKERFILE_PATH" -NextVersion $version
} else {
Write-Host "Skipping .NET 11 AMD64 update - No version detected"
}
Expand All @@ -137,7 +143,7 @@ jobs:
run: |
$version = & "./LambdaRuntimeDockerfiles/get-latest-aspnet-versions.ps1" -MajorVersion "11"
if (-not [string]::IsNullOrEmpty($version)) {
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "${{ env.DOCKERFILE_PATH }}" -NextVersion $version
& "./LambdaRuntimeDockerfiles/update-dockerfile.ps1" -DockerfilePath "$env:DOCKERFILE_PATH" -NextVersion $version
} else {
Write-Host "Skipping .NET 11 ARM64 update - No version detected"
}
Expand Down Expand Up @@ -196,7 +202,7 @@ jobs:
- name: Create Pull Request
id: pull-request
if: ${{ steps.commit-push.outputs.CHANGES_MADE == 'true' }}
uses: repo-sync/pull-request@v2
uses: repo-sync/pull-request@7e79a9f5dc3ad0ce53138f01df2fad14a04831c5 # v2
with:
source_branch: ${{ steps.commit-push.outputs.BRANCH }}
destination_branch: "dev"
Expand Down Expand Up @@ -226,13 +232,15 @@ jobs:
# Add "Release Not Needed" label to the PR
- name: Add Release Not Needed label
if: ${{ steps.pull-request.outputs.pr_number }}
uses: actions/github-script@v8
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
env:
PR_NUMBER: ${{ steps.pull-request.outputs.pr_number }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: ${{ steps.pull-request.outputs.pr_number }},
issue_number: Number(process.env.PR_NUMBER),
labels: ['Release Not Needed']
})
28 changes: 22 additions & 6 deletions .github/workflows/aws-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ on:
- dev
- "feature/**"

permissions:
id-token: write
permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
run-ci:
name: Run CI
runs-on: ubuntu-latest
permissions:
id-token: write # to assume AWS roles via OIDC
steps:
- name: Configure Load Balancer Credentials
uses: aws-actions/configure-aws-credentials@8df5847569e6427dd6c4fb1cf565c83acfa8afa7 # v6.0.0
Expand All @@ -24,8 +30,13 @@ jobs:
- name: Invoke Load Balancer Lambda
id: lambda
shell: pwsh
env:
LOAD_BALANCER_LAMBDA_NAME: ${{ secrets.CI_TESTING_LOAD_BALANCER_LAMBDA_NAME }}
TEST_RUNNER_ACCOUNT_ROLES: ${{ secrets.CI_TEST_RUNNER_ACCOUNT_ROLES }}
CODE_BUILD_PROJECT_NAME: ${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}
BRANCH: ${{ github.sha }}
run: |
aws lambda invoke response.json --function-name "${{ secrets.CI_TESTING_LOAD_BALANCER_LAMBDA_NAME }}" --cli-binary-format raw-in-base64-out --payload '{"Roles": "${{ secrets.CI_TEST_RUNNER_ACCOUNT_ROLES }}", "ProjectName": "${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}", "Branch": "${{ github.sha }}"}'
aws lambda invoke response.json --function-name "$env:LOAD_BALANCER_LAMBDA_NAME" --cli-binary-format raw-in-base64-out --payload "{`"Roles`": `"$env:TEST_RUNNER_ACCOUNT_ROLES`", `"ProjectName`": `"$env:CODE_BUILD_PROJECT_NAME`", `"Branch`": `"$env:BRANCH`"}"
$roleArn=$(cat ./response.json)
"roleArn=$($roleArn -replace '"', '')" >> $env:GITHUB_OUTPUT
- name: Configure Test Runner Credentials
Expand All @@ -36,7 +47,7 @@ jobs:
aws-region: us-west-2
- name: Run Tests on AWS
id: codebuild
uses: aws-actions/aws-codebuild-run-build@v1
uses: aws-actions/aws-codebuild-run-build@4d15a47425739ac2296ba5e7eee3bdd4bfbdd767 # v1.0.18
with:
project-name: ${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}
- name: Configure Test Sweeper Lambda Credentials
Expand All @@ -49,10 +60,15 @@ jobs:
- name: Invoke Test Sweeper Lambda
if: always()
shell: pwsh
env:
TEST_SWEEPER_LAMBDA_NAME: ${{ secrets.CI_TESTING_TEST_SWEEPER_LAMBDA_NAME }}
CODE_BUILD_PROJECT_NAME: ${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}
run: |
aws lambda invoke response.json --function-name "${{ secrets.CI_TESTING_TEST_SWEEPER_LAMBDA_NAME }}" --cli-binary-format raw-in-base64-out --payload '{"Tags": "aws-repo=${{ secrets.CI_TESTING_CODE_BUILD_PROJECT_NAME }}"}'
aws lambda invoke response.json --function-name "$env:TEST_SWEEPER_LAMBDA_NAME" --cli-binary-format raw-in-base64-out --payload "{`"Tags`": `"aws-repo=$env:CODE_BUILD_PROJECT_NAME`"}"
- name: CodeBuild Link
shell: pwsh
env:
BUILD_ID: ${{ steps.codebuild.outputs.aws-build-id }}
run: |
$buildId = "${{ steps.codebuild.outputs.aws-build-id }}"
$buildId = "$env:BUILD_ID"
echo $buildId
19 changes: 13 additions & 6 deletions .github/workflows/build-lambda-runtime-dockerfiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,18 @@ on:
paths:
- "LambdaRuntimeDockerfiles/**"

permissions:
contents: read
permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build-runtime-images:
name: Build runtime image (${{ matrix.name }})
runs-on: ubuntu-latest
permissions:
contents: read # to check out the repository and build the Dockerfiles
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -45,16 +50,18 @@ jobs:
platform: linux/arm64

steps:
- uses: actions/checkout@85e6279cec87321a52edac9c87bce653a07cf6c2 #v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
persist-credentials: false

- name: Set up QEMU
uses: docker/setup-qemu-action@v4
uses: docker/setup-qemu-action@06116385d9baf250c9f4dcb4858b16962ea869c3 # v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
uses: docker/setup-buildx-action@d7f5e7f509e45cec5c76c4d5afdd7de93d0b3df5 # v4

- name: Build ${{ matrix.name }}
uses: docker/build-push-action@v7
uses: docker/build-push-action@f9f3042f7e2789586610d6e8b85c8f03e5195baf # v7
with:
context: .
file: ${{ matrix.dockerfile }}
Expand Down
18 changes: 15 additions & 3 deletions .github/workflows/change-file-in-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,36 @@ on:
pull_request:
types: [opened, synchronize, reopened, labeled]

permissions: {}

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
check-files-in-directory:
if: ${{ !contains(github.event.pull_request.labels.*.name, 'Release Not Needed') && !contains(github.event.pull_request.labels.*.name, 'Release PR') }}
name: Change File Included in PR
runs-on: ubuntu-latest
permissions:
contents: read # to check out the repository and list changed files

steps:
- name: Checkout PR code
uses: actions/checkout@v6
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Get List of Changed Files
id: changed-files
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5
uses: tj-actions/changed-files@22103cc46bda19c2b464ffe86db46df6922fd323 # v47.0.5

- name: Check for Change File(s) in .autover/changes/
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
DIRECTORY=".autover/changes/"
if echo "${{ steps.changed-files.outputs.all_changed_files }}" | grep -q "$DIRECTORY"; then
if echo "$ALL_CHANGED_FILES" | grep -q "$DIRECTORY"; then
echo "✅ One or more change files in '$DIRECTORY' are included in this PR."
else
echo "❌ No change files in '$DIRECTORY' are included in this PR."
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/closed-issue-message.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,24 @@ on:
issues:
types: [closed]

permissions:
issues: write
permissions: {}

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
auto_comment:
name: Comment on closed issue
runs-on: ubuntu-latest
permissions:
issues: write # to comment on the closed issue
steps:
- uses: aws-actions/closed-issue-message@v2
- uses: aws-actions/closed-issue-message@10aaf6366131b673a7c8b7742f8b3849f1d44f18 # v2
with:
# These inputs are both required
repo-token: "${{ secrets.GITHUB_TOKEN }}"
message: |
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.
23 changes: 16 additions & 7 deletions .github/workflows/create-release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,19 @@ on:
type: string
required: false

permissions:
id-token: write
repository-projects: read
permissions: {}

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
release-pr:
name: Release PR
runs-on: ubuntu-latest
permissions:
id-token: write # to assume AWS roles via OIDC
repository-projects: read # to read project metadata when creating the release PR

env:
INPUT_OVERRIDE_VERSION: ${{ github.event.inputs.OVERRIDE_VERSION }}
Expand Down Expand Up @@ -97,10 +102,11 @@ jobs:
run: autover changelog
# Push the release branch up as well as the created tag
- name: Push Changes
env:
BRANCH: ${{ steps.create-release-branch.outputs.BRANCH }}
run: |
branch=${{ steps.create-release-branch.outputs.BRANCH }}
git push origin $branch
git push origin $branch --tags
git push origin "$BRANCH"
git push origin "$BRANCH" --tags
# Get the release name that will be used to create a PR
- name: Read Release Name
id: read-release-name
Expand All @@ -117,7 +123,10 @@ jobs:
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ env.FG_PAT }}
VERSION: ${{ steps.read-release-name.outputs.VERSION }}
CHANGELOG: ${{ steps.read-changelog.outputs.CHANGELOG }}
BRANCH: ${{ steps.create-release-branch.outputs.BRANCH }}
run: |
gh label create "Release PR" --description "A Release PR that includes versioning and changelog changes" -c "#FF0000" -f
pr_url="$(gh pr create --title "${{ steps.read-release-name.outputs.VERSION }}" --label "Release PR" --body "${{ steps.read-changelog.outputs.CHANGELOG }}" --base dev --head ${{ steps.create-release-branch.outputs.BRANCH }})"
pr_url="$(gh pr create --title "$VERSION" --label "Release PR" --body "$CHANGELOG" --base dev --head "$BRANCH")"

10 changes: 8 additions & 2 deletions .github/workflows/handle-stale-discussions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,20 @@ on:
discussion_comment:
types: [created]

permissions: {}

concurrency:
group: ${{ github.workflow }}
cancel-in-progress: false

jobs:
handle-stale-discussions:
name: Handle stale discussions
runs-on: ubuntu-latest
permissions:
discussions: write
discussions: write # to mark and close stale discussions
steps:
- name: Stale discussions action
uses: aws-github-ops/handle-stale-discussions@v1.6.0
uses: aws-github-ops/handle-stale-discussions@c0beee451a5d33d9c8f048a6d4e7c856b5422544 # v1.6.0
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
Loading
Loading