diff --git a/09-github-action-oidc-aws/.github/workflows/deploy.yml b/09-github-action-oidc-aws/.github/workflows/deploy.yml new file mode 100644 index 0000000..b0e91b8 --- /dev/null +++ b/09-github-action-oidc-aws/.github/workflows/deploy.yml @@ -0,0 +1,27 @@ +name: Deploy to AWS + +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + permissions: + id-token: write # required for OIDC + contents: read + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: arn:aws:iam::529496936957:role/GitHubOIDCRole + aws-region: us-east-1 + + - name: Test AWS + run: aws s3 ls + diff --git a/09-github-action-oidc-aws/README.md b/09-github-action-oidc-aws/README.md index a6e5201..22382a9 100644 --- a/09-github-action-oidc-aws/README.md +++ b/09-github-action-oidc-aws/README.md @@ -4,4 +4,4 @@ ## Project Documentation -Refer [GitHub Actions OIDC AWS Integration] (https://devopscube.com/github-actions-oidc-aws/) for the entire setup walkthrough \ No newline at end of file +Refer [GitHub Actions OIDC AWS Integration] (https://devopscube.com/github-actions-oidc-aws/) for the entire setup walkthrough# test