|
23 | 23 | - name: Install dependencies
|
24 | 24 | run: cd tools/@aws-cdk/enum-updater && yarn install --frozen-lockfile && yarn build
|
25 | 25 |
|
| 26 | + - name: Update enum static mapping |
| 27 | + run: | |
| 28 | + cd tools/@aws-cdk/enum-updater |
| 29 | + ./bin/update-static-enum-mapping |
| 30 | +
|
| 31 | + - name: Check for changes |
| 32 | + id: git-check |
| 33 | + run: | |
| 34 | + if [[ -n "$(git status --porcelain)" ]]; then |
| 35 | + echo "changes=true" >> $GITHUB_OUTPUT |
| 36 | + else |
| 37 | + echo "changes=false" >> $GITHUB_OUTPUT |
| 38 | + fi |
| 39 | + |
| 40 | + - name: Create PR for static mapping changes |
| 41 | + if: steps.git-check.outputs.changes == 'true' |
| 42 | + run: | |
| 43 | + git config --global user.name 'aws-cdk-automation' |
| 44 | + git config --global user.email '[email protected]' |
| 45 | +
|
| 46 | + # Create a new branch for the module |
| 47 | + branchName="enum-update/static-mapping-update" |
| 48 | + git checkout -b "$branchName" |
| 49 | +
|
| 50 | + git add . # Add all files changed |
| 51 | + git commit -m "chore: update enum static mapping" |
| 52 | + git push origin "$branchName" |
| 53 | +
|
26 | 54 | - name: Identify Missing Values and Apply Code Changes
|
27 | 55 | run: |
|
28 | 56 | cd tools/@aws-cdk/enum-updater
|
@@ -76,11 +104,11 @@ jobs:
|
76 | 104 | git push origin "$branchName"
|
77 | 105 |
|
78 | 106 | # Create a new pull request
|
79 |
| - gh pr create --title "chore(${moduleName#aws-}): add new enum values for ${moduleName#aws-}" \ |
80 |
| - --body "This PR updates the enum values for ${moduleName#aws-}." \ |
81 |
| - --base main \ |
82 |
| - --head "$branchName" |
83 |
| - --label "contribution/core,pr-linter/exempt-integ-test,pr-linter/exempt-readme,pr-linter/exempt-test" |
84 |
| - done |
| 107 | + # gh pr create --title "chore(${moduleName#aws-}): add new enum values for ${moduleName#aws-}" \ |
| 108 | + # --body "This PR updates the enum values for ${moduleName#aws-}." \ |
| 109 | + # --base main \ |
| 110 | + # --head "$branchName" |
| 111 | + # --label "contribution/core,pr-linter/exempt-integ-test,pr-linter/exempt-readme,pr-linter/exempt-test" |
| 112 | + # done |
85 | 113 | env:
|
86 | 114 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
0 commit comments