77 dir_name :
88 description : ' Sync Directories'
99 required : true
10- default : ' steering_docs '
10+ default : ' scenarios '
1111 type : choice
1212 options :
1313 - steering_docs
1414 - scenarios
15-
15+ - coding-standards
1616
1717permissions :
1818 id-token : write
@@ -33,26 +33,39 @@ jobs:
3333 role-to-assume : ${{ secrets.AWS_ASSUME_ROLE }}
3434 aws-region : us-west-2
3535
36- - name : Set SDK and language mapping for S3
36+ - name : Configure directory mapping for S3
3737 run : |
3838 if [ "$dir_name" == "steering_docs" ]; then
3939 echo "S3_NAME=steering-docs" >> $GITHUB_ENV
40+ elif [ "$dir_name" == "coding-standards" ]; then
41+ echo "S3_NAME=coding-standards" >> $GITHUB_ENV
4042 elif [ "$dir_name" == "scenarios" ]; then
4143 echo "S3_NAME=final-specs" >> $GITHUB_ENV
4244 fi
4345
44- - name : Filter SPECIFICATION.md files for scenarios
46+ - name : Filter SPECIFICATION.md files for specs
4547 if : ${{ github.event.inputs.dir_name == 'scenarios' }}
4648 run : |
4749 find ./scenarios -name "SPECIFICATION.md" | while read file; do
4850 mkdir -p "./filtered_scenarios/$(dirname "$file")"
4951 cp "$file" "./filtered_scenarios/$file"
5052 done
53+
54+ - name : Clone and filter for coding standards
55+ if : ${{ github.event.inputs.dir_name == 'coding-standards' }}
56+ run : |
57+ git clone https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.wiki.git wiki-repo
58+ mkdir -p ./filtered-wiki
59+ find ./wiki-repo -type f -name "*[Gg]uidelines*.md" -o -name "*[Ss]tandards*.md" | while read file; do
60+ cp "$file" ./filtered-wiki/
61+ done
5162
5263 - name : Upload/Sync to S3
5364 run : |
5465 if [ "$dir_name" == "steering_docs" ]; then
5566 aws s3 sync "./$dir_name/" "s3://$S3_NAME-bucket/" --delete
67+ elif [ "$dir_name" == "coding-standards" ]; then
68+ aws s3 sync "./filtered-wiki/" "s3://$S3_NAME-bucket/" --delete
5669 else
5770 aws s3 sync "./filtered_scenarios/" "s3://$S3_NAME-bucket/" --delete
5871 fi
6679 response.json
6780
6881 echo "Knowledge Base sync initiated"
69- cat response.json
82+ cat response.json
0 commit comments