Skip to content

Commit dd4aa11

Browse files
committed
Merge branch 'develop' into chore/maintainers-update
* develop: fix(ci): escape outputs as certain PRs can break GH Actions expressions chore(deps): bump actions/setup-node from 2 to 3 (aws-powertools#1281) chore(ci): auto-merge cdk lib and lambda layer construct fix(ci): move conditionals from yaml to code; leftover chore(governance): remove any step relying on master branch chore(ci): move all scripts under .github/scripts chore(ci): move error prone env to code as constants fix(ci): move conditionals from yaml to code
2 parents b9ce849 + 43e6729 commit dd4aa11

File tree

5 files changed

+19
-10
lines changed

5 files changed

+19
-10
lines changed

.github/workflows/auto-merge.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,21 @@ jobs:
1818
with:
1919
github-token: "${{ secrets.GITHUB_TOKEN }}"
2020
- name: Enable auto-merge for mypy-boto3 stubs Dependabot PRs
21-
if: ${{contains(steps.metadata.outputs.dependency-names, 'mypy-boto3')}} # && steps.metadata.outputs.update-type == 'version-update:semver-patch'
21+
if: ${{ contains(steps.metadata.outputs.dependency-names, 'mypy-boto3') && steps.metadata.outputs.update-type != 'version-update:semver-major' }}
22+
run: gh pr merge --auto --squash "$PR_URL"
23+
env:
24+
PR_URL: ${{github.event.pull_request.html_url}}
25+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
26+
# Maintenance: Experiment with literal array (toJSON('["dep1", "dep2"]')) to ease extending it
27+
- name: Enable auto-merge for CDK Construct Lambda Layer Dependabot PRs
28+
if: ${{ contains(steps.metadata.outputs.dependency-names, 'cdk-lambda-powertools-python-layer') && steps.metadata.outputs.update-type != 'version-update:semver-major' }}
29+
run: gh pr merge --auto --squash "$PR_URL"
30+
env:
31+
PR_URL: ${{github.event.pull_request.html_url}}
32+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
33+
# Maintenance: Revisit if CDK Constructs make breaking changes like CDK v1
34+
- name: Enable auto-merge for CDK Lib Construct
35+
if: ${{ contains(steps.metadata.outputs.dependency-names, 'aws-cdk-lib') && steps.metadata.outputs.update-type != 'version-update:semver-major' }}
2236
run: gh pr merge --auto --squash "$PR_URL"
2337
env:
2438
PR_URL: ${{github.event.pull_request.html_url}}

.github/workflows/on_merged_pr.yml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,10 @@ jobs:
1616
token: ${{ secrets.GITHUB_TOKEN }}
1717
release_label_on_merge:
1818
needs: get_pr_details
19-
# Maintenance: Conditional isn't working as expected
20-
if: |
21-
needs.get_pr_details.outputs.prAuthor != 'dependabot[bot]'
22-
&& needs.get_pr_details.outputs.prIsMerged == true
2319
runs-on: ubuntu-latest
2420
steps:
2521
- name: Debug outputs
26-
run: echo "Outputs ${{ toJSON(needs.get_pr_details.outputs) }}"
22+
run: echo 'Outputs ${{ toJSON(needs.get_pr_details.outputs) }}'
2723
- uses: actions/checkout@v3
2824
- name: "Label PR related issue for release"
2925
uses: actions/github-script@v6

.github/workflows/on_opened_pr.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ on:
66
types:
77
- completed
88

9-
109
jobs:
1110
get_pr_details:
1211
if: ${{ github.event.workflow_run.conclusion == 'success' }}
@@ -20,7 +19,7 @@ jobs:
2019
runs-on: ubuntu-latest
2120
steps:
2221
- name: Debug outputs
23-
run: echo "Outputs ${{ toJSON(needs.get_pr_details.outputs) }}"
22+
run: echo 'Outputs ${{ toJSON(needs.get_pr_details.outputs) }}'
2423
- uses: actions/checkout@v3
2524
- name: "Ensure related issue is present"
2625
if: contains('["opened", "edited"]', needs.get_pr_details.outputs.prAction)

.github/workflows/publish_layer.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
- name: checkout
2828
uses: actions/checkout@v2
2929
- name: Setup Node.js
30-
uses: actions/setup-node@v2
30+
uses: actions/setup-node@v3
3131
with:
3232
node-version: '16.12'
3333
- name: Setup python

.github/workflows/reusable_deploy_layer_stack.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
aws-region: ${{ matrix.region }}
6060
role-to-assume: ${{ secrets.target-account-role }}
6161
- name: Setup Node.js
62-
uses: actions/setup-node@v2
62+
uses: actions/setup-node@v3
6363
with:
6464
node-version: '16.12'
6565
- name: Setup python

0 commit comments

Comments
 (0)