Skip to content

Commit

Permalink
feat: initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
coderbyheart committed Apr 5, 2024
0 parents commit b615648
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy

permissions:
id-token: write

on:
workflow_dispatch:
push:
branches:
- saga
env:
CI: 1
FORCE_COLOR: 3
JSII_SILENCE_WARNING_UNTESTED_NODE_VERSION: 1
NODE_NO_WARNINGS: 1

jobs:
deploy:
runs-on: ubuntu-22.04

timeout-minutes: 5

steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4

# This will only work, if you've run `npx cdk deploy` once manually.
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
# The role is set up via https://github.com/bifravst/ci
# secrets.AWS_ACCOUNT_ID_CI is an organization secret
role-to-assume: |
arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID_CI }}:role/${{ github.repository_owner }}-ci-${{ github.event.repository.name }}
# vars.AWS_REGION_CI is an organization variable
aws-region: ${{ vars.AWS_REGION_CI }}

- run: npx cdk deploy --require-approval never
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/ci/
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Bifravst CI

Uses [hello-nrfcloud/ci](https://github.com/hello-nrfcloud/ci) to set up the permissions in our AWS CI account for the repositories in this
GitHub organization that are supposed to have access so they are be able to use
it for CI runs.

The allowed list of repositories is managed via the [`repos.txt`](./repos.txt)
file.

> [!CAUTION]
> Do not run this against the production account, but against the CI account.
```bash
git clone https://github.com/hello-nrfcloud/ci
npm ci
REPOS_LIST=../repos.txt npx cdk deploy
```
2 changes: 2 additions & 0 deletions repos.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
bifravst/ci
bifravst/aws-cdk-lambda-helpers

0 comments on commit b615648

Please sign in to comment.