Skip to content

Commit ac2b867

Browse files
committed
add gh for static mapping
1 parent 78be158 commit ac2b867

File tree

1 file changed

+34
-6
lines changed

1 file changed

+34
-6
lines changed

Diff for: .github/workflows/enum-auto-updater.yml

+34-6
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,34 @@ jobs:
2323
- name: Install dependencies
2424
run: cd tools/@aws-cdk/enum-updater && yarn install --frozen-lockfile && yarn build
2525

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+
2654
- name: Identify Missing Values and Apply Code Changes
2755
run: |
2856
cd tools/@aws-cdk/enum-updater
@@ -76,11 +104,11 @@ jobs:
76104
git push origin "$branchName"
77105
78106
# 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
85113
env:
86114
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)