Skip to content

shubhdarlinge/sync-repository-to-aws-codecommit

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 

Repository files navigation

Sync Repository to AWS CodeCommit

Syncs a repository to AWS CodeCommit using AWS Credentials authorized through GitHub OIDC token.

Parameters

Name Meaning Required? Default Value
role-to-assume The ARN for AWS IAM Role to be assumed while making requests to AWS CodeCommit Yes N/A
aws-region The AWS region that the CodeCommitRepository is in No us-east-1
repository The name of repository being synced No Context Value: github.repository

Pre-requisites

  • Configure GitHub OIDC in AWS for authorization. See this.
  • The IAM Role used for OIDC should have permissions for AWS CodeCommit's GetRepository, CreateRepository and GitPush APIs.

Example Usage

In the repository you want to sync to AWS CodeCommit, create a GitHub workflow to invoke this action.

name: Sync Repository to AWS CodeCommit

on:
  push:
    branches: [ "**" ]

jobs:
  sync:
    runs-on: ubuntu-latest
    permissions:
      id-token: write
      contents: read
    steps:
      - name: Sync to AWS CodeCommit
        uses: shubhdarlinge/sync-repository-to-aws-codecommit@v4
        with:
          role-to-assume: arn:aws:iam::1234567890:role/FakeRepositorySyncRole