generated from actions/typescript-action
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (108 loc) · 2.91 KB
/
test.yml
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: 'build-test'
on: # rebuild any PRs and main branch changes
pull_request:
push:
branches:
- main
- 'releases/*'
jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
npm install
- run: |
npm run all
test-existing-sg:
runs-on: ubuntu-latest
if: github.repository_owner == 'sonikro'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: ./
with:
role_arn: "${{secrets.TEST_ROLE_ARN}}"
image: hashicorp/terraform:latest
region: us-east-1
vpc_id: "${{secrets.TEST_VPC_ID}}"
subnet_ids: |
${{secrets.TEST_SUBNET_ID}}
security_group_id: sg-04d5dfcb3fcd1285b
shell: sh
run: |
ls -la
terraform -v
echo "Hello World. I am ${{github.repository}}"
echo "Testing $GITHUB_REPOSITORY variable"
test-new-sg:
runs-on: ubuntu-latest
if: github.repository_owner == 'sonikro'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: ./
with:
role_arn: "${{secrets.TEST_ROLE_ARN}}"
image: hashicorp/terraform:latest
region: us-east-1
vpc_id: "${{secrets.TEST_VPC_ID}}"
subnet_ids: |
${{secrets.TEST_SUBNET_ID}}
shell: sh
run: |
ls -la
terraform -v
echo "Hello World. I am ${{github.repository}}"
echo "Testing $GITHUB_REPOSITORY variable"
test-auto-subnet-ids:
runs-on: ubuntu-latest
if: github.repository_owner == 'sonikro'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: ./
with:
role_arn: "${{secrets.TEST_ROLE_ARN}}"
image: hashicorp/terraform:latest
region: us-east-1
vpc_id: "${{secrets.TEST_VPC_ID}}"
shell: sh
run: |
ls -la
terraform -v
echo "Hello World. I am ${{github.repository}}"
echo "Testing $GITHUB_REPOSITORY variable"
test-workspace-sync:
runs-on: ubuntu-latest
if: github.repository_owner == 'sonikro'
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v3
- uses: ./
with:
role_arn: "${{secrets.TEST_ROLE_ARN}}"
image: alpine
region: us-east-1
vpc_id: "${{secrets.TEST_VPC_ID}}"
shell: sh
run: |
ls -la
echo "ecs generated contend" > testfile.txt
- shell: bash
run: |
if [ -f "testfile.txt" ];
then
cat testfile.txt
else
echo "testfile is missing"
exit 1
fi