chore: Updating handlers to use python39 runtime #90
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Sync GitHub with AWS CodeCommit for Scene Intelligence with Rosbag on AWS | |
on: | |
# Triggers the workflow on push or pull request events but only for the "scene-intelligence-with-rosbag-on-aws" branch | |
push: | |
branches: ["scene-intelligence-with-rosbag-on-aws"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Permission can be added at job level or workflow level | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
# if: github.ref == 'refs/heads/addf-sonarscan-branch' | |
steps: | |
- name: Git clone the repository | |
uses: actions/checkout@v3 | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v1.7.0 | |
with: | |
role-to-assume: arn:aws:iam::052886665315:role/GitHubAction-AssumeRoleWithAction #change to reflect your IAM role’s ARN | |
role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
aws-region: us-west-2 | |
- name: Install utilities | |
run: | | |
pip install git-remote-codecommit | |
git clone codecommit::us-west-2://scene-intelligence-with-rosbag-on-aws | |
ls -al | |
ls -al scene-intelligence-with-rosbag-on-aws | |
echo "Copying modules one after the other" | |
# Analysis | |
cp -R modules/analysis/rosbag-image-pipeline scene-intelligence-with-rosbag-on-aws/modules/analysis/ | |
# Core | |
cp -R modules/core/metadata-storage scene-intelligence-with-rosbag-on-aws/modules/core | |
# Integration | |
cp -R modules/integration/ddb-to-opensearch scene-intelligence-with-rosbag-on-aws/modules/integration | |
cp -R modules/integration/opensearch-tunnel scene-intelligence-with-rosbag-on-aws/modules/integration | |
# Optionals | |
cp -R modules/optionals/datalake-buckets scene-intelligence-with-rosbag-on-aws/modules/optionals | |
# Post processing | |
cp -R modules/post-processing/yolo-object-detection scene-intelligence-with-rosbag-on-aws/modules/post-processing | |
cp -R modules/post-processing/yolop-lane-detection scene-intelligence-with-rosbag-on-aws/modules/post-processing | |
# Sensor extraction | |
cp -R modules/sensor-extraction/ros-to-parquet scene-intelligence-with-rosbag-on-aws/modules/sensor-extraction | |
cp -R modules/sensor-extraction/ros-to-png scene-intelligence-with-rosbag-on-aws/modules/sensor-extraction | |
ls -al scene-intelligence-with-rosbag-on-aws/modules/ | |
echo "Copied modules" | |
echo "Copying Manifest file contents..." | |
cp -R manifests/aws-solutions/ scene-intelligence-with-rosbag-on-aws/manifests/ | |
echo "Copying Root Directory changes..." | |
cp README.md scene-intelligence-with-rosbag-on-aws/ | |
cp CHANGELOG.md scene-intelligence-with-rosbag-on-aws/ | |
cp NOTICE.txt scene-intelligence-with-rosbag-on-aws/ | |
cp LICENSE.txt scene-intelligence-with-rosbag-on-aws/ | |
cp .viperlightignore scene-intelligence-with-rosbag-on-aws/ | |
cp .cfnnag_global_disable scene-intelligence-with-rosbag-on-aws/ | |
cp .bandit scene-intelligence-with-rosbag-on-aws/ | |
cp buildspec.yml scene-intelligence-with-rosbag-on-aws/ | |
cp -r .github scene-intelligence-with-rosbag-on-aws/ | |
cp -R images scene-intelligence-with-rosbag-on-aws/ | |
cp -R deployment scene-intelligence-with-rosbag-on-aws/ | |
cd scene-intelligence-with-rosbag-on-aws/ | |
git config --global user.email "${{github.actor}}@users.noreply.github.com" | |
git config --global user.name "Github-CodeCommit-Sync" | |
git config --global init.defaultBranch main | |
git remote -v | |
git branch -a | |
git add -A | |
git status | |
if ! git diff-index --quiet HEAD; then | |
git commit -m "${{ github.event.head_commit.message }}" | |
git push origin main | |
else | |
echo "No change detected... nothing to commit..." | |
fi |