Workflow file for this run
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 AV/ADAS Solutions | |
on: | |
# Triggers the workflow on push or pull request events but only for the "av-adas-solution" branch | |
push: | |
branches: ["av-adas-solution"] | |
pull_request: | |
branches: ["av-adas-solution"] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
sync: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
# 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@@v4 | |
with: | |
role-to-assume: arn:aws:iam::180024969694: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://av-adas-solution | |
ls -al | |
ls -al av-adas-solution | |
echo "Copying modules one after the other" | |
cp -R modules/compute/aws-batch av-adas-solution/modules/compute | |
cp -R modules/compute/emr-serverless av-adas-solution/modules/compute | |
ls -al av-adas-solution/modules/ | |
echo "Copyied modules" | |
cd av-adas-solution/ | |
git config --global user.email "[email protected]" | |
git config --global user.name "Srinivas" | |
git config --global init.defaultBranch main | |
git branch -a | |
git add -A | |
git status | |
git commit -m "sync gh with cc" | |
git remote -v | |
git status | |
git push origin main |