-
Notifications
You must be signed in to change notification settings - Fork 5
/
.projenrc.js
90 lines (79 loc) · 2.13 KB
/
.projenrc.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
const {
AwsCdkConstructLibrary,
} = require('projen');
const AUTOMATION_TOKEN = 'AUTOMATION_GITHUB_TOKEN';
const project = new AwsCdkConstructLibrary({
authorAddress: '[email protected]',
authorName: 'Pahud Hsieh',
cdkVersion: '1.83.0',
name: 'cdk-efs-assets',
repository: 'https://github.com/pahud/cdk-efs-assets.git',
description: 'Amazon EFS assets from Github repositories or S3 buckets',
cdkDependencies: [
'@aws-cdk/core',
'@aws-cdk/aws-ec2',
'@aws-cdk/aws-efs',
'@aws-cdk/aws-iam',
'@aws-cdk/aws-lambda',
'@aws-cdk/aws-s3',
'@aws-cdk/aws-events-targets',
'@aws-cdk/aws-secretsmanager',
'@aws-cdk/custom-resources',
],
dependabot: false,
keywords: [
'aws',
'cdk',
'efs',
'github',
],
catalog: {
twitter: 'pahudnet',
announce: false,
},
python: {
distName: 'cdk-efs-assets',
module: 'cdk_efs_assets',
},
});
// create a custom projen and yarn upgrade workflow
const workflow = project.github.addWorkflow('ProjenYarnUpgrade');
workflow.on({
schedule: [{
cron: '11 0 * * *',
}], // 0:11am every day
workflow_dispatch: {}, // allow manual triggering
});
workflow.addJobs({
upgrade: {
'runs-on': 'ubuntu-latest',
'steps': [
{ uses: 'actions/checkout@v2' },
{
uses: 'actions/setup-node@v1',
with: {
'node-version': '10.17.0',
},
},
{ run: 'yarn upgrade' },
{ run: 'yarn projen:upgrade' },
// submit a PR
{
name: 'Create Pull Request',
uses: 'peter-evans/create-pull-request@v3',
with: {
'token': '${{ secrets.' + AUTOMATION_TOKEN + ' }}',
'commit-message': 'chore: upgrade projen',
'branch': 'auto/projen-upgrade',
'title': 'chore: upgrade projen and yarn',
'body': 'This PR upgrades projen and yarn upgrade to the latest version',
'labels': 'auto-merge',
},
},
],
},
});
const common_exclude = ['cdk.out', 'cdk.context.json', 'images', 'yarn-error.log'];
project.npmignore.exclude(...common_exclude);
project.gitignore.exclude(...common_exclude);
project.synth();