-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from yashrajdighe/add-workflow
added main.yaml workflow file
- Loading branch information
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
name: List all S3 buckets | ||
|
||
on: | ||
push: | ||
branches: [ main ] | ||
pull_request: | ||
branches: [ main ] | ||
|
||
env: | ||
AWS_REGION : "us-east-1" | ||
|
||
permissions: | ||
id-token: write # This is required for requesting the JWT | ||
contents: read # This is required for actions/checkout | ||
jobs: | ||
AssumeRoleAndCallIdentity: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Git clone the repository | ||
uses: actions/checkout@v3 | ||
- name: configure aws credentials | ||
uses: aws-actions/[email protected] | ||
with: | ||
role-to-assume: arn:aws:iam::851725231363:role/github-oidc-assume-role | ||
role-session-name: GitHub_to_AWS_via_FederatedOIDC | ||
aws-region: ${{ env.AWS_REGION }} | ||
- name: Sts GetCallerIdentity | ||
run: | | ||
aws sts get-caller-identity | ||
- name: List Buckets | ||
run: | | ||
aws s3 ls |