Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
vladcos committed Dec 3, 2023
1 parent a657d3a commit 585497b
Show file tree
Hide file tree
Showing 11 changed files with 1,137 additions and 3,959 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 6 additions & 1 deletion .github/workflows/release.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .github/workflows/upgrade-main.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 4 additions & 11 deletions .projen/deps.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions .projen/tasks.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 14 additions & 0 deletions .projenrc.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import { GithubAction, RunsUsing } from '@vladcos/projen-github-action'

import { createAwsStep } from '@/.projenrc/createAwsStep'
import { addTestJob } from '@/.projenrc/test-workflow'

import type { JobStep } from 'projen/lib/github/workflows-model'
import type { RenderWorkflowSetupOptions } from 'projen/lib/javascript'

const project = new (class extends GithubAction {
override preSynthesize() {
super.preSynthesize()
Expand All @@ -10,6 +14,16 @@ const project = new (class extends GithubAction {
)
addTestJob(this.release!, releaseWorkflowFile!)
}

override renderWorkflowSetup(
options?: RenderWorkflowSetupOptions,
): JobStep[] {
const setup = super.renderWorkflowSetup(options)

setup.push(createAwsStep())

return setup
}
})({
defaultReleaseBranch: 'main',
devDeps: [
Expand Down
12 changes: 12 additions & 0 deletions .projenrc/createAwsStep.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
import { JobStep } from 'projen/lib/github/workflows-model'

export function createAwsStep(): JobStep {
return {
name: 'Configure AWS credentials',
uses: 'aws-actions/configure-aws-credentials@v2',
with: {
'role-to-assume': '${{ vars.AWS_ROLE }}',
'aws-region': '${{ vars.AWS_REGION }}',
},
}
}
Loading

0 comments on commit 585497b

Please sign in to comment.