File tree Expand file tree Collapse file tree 2 files changed +60
-11
lines changed
Expand file tree Collapse file tree 2 files changed +60
-11
lines changed Original file line number Diff line number Diff line change 66 pull_request :
77 branches :
88 - main
9+ workflow_call :
10+ inputs :
11+ aws_region :
12+ type : string
13+ required : true
14+ aws_endpoint_url_s3 :
15+ type : string
16+ required : true
17+ gh_owner :
18+ type : string
19+ required : true
20+ gh_app_id :
21+ type : string
22+ required : true
23+ gh_app_installation_id :
24+ type : string
25+ required : true
26+ path :
27+ type : string
28+ required : true
29+ secrets :
30+ aws_access_key_id :
31+ required : true
32+ aws_secret_access_key :
33+ required : true
34+ gh_app_pem_file :
35+ required : true
936
1037env :
11- AWS_REGION : ${{ vars.AWS_REGION }}
12- AWS_ENDPOINT_URL_S3 : ${{ vars.AWS_ENDPOINT_URL_S3 }}
13- AWS_ACCESS_KEY_ID : ${{ secrets.AWS_ACCESS_KEY_ID }}
14- AWS_SECRET_ACCESS_KEY : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
15- GITHUB_OWNER : ${{ vars.OWNER }}
16- GITHUB_APP_ID : ${{ vars.APP_ID }}
17- GITHUB_APP_INSTALLATION_ID : ${{ vars.APP_INSTALLATION_ID }}
18- GITHUB_APP_PEM_FILE : ${{ secrets.APP_PEM_FILE }}
19- TF_WORKSPACE : ${{ vars.OWNER }}
20- TF_VAR_path : test.yaml
38+ AWS_REGION : ${{ inputs.aws_region || vars.AWS_REGION }}
39+ AWS_ENDPOINT_URL_S3 : ${{ inputs.aws_endpoint_url_s3 || vars.AWS_ENDPOINT_URL_S3 }}
40+ AWS_ACCESS_KEY_ID : ${{ secrets.aws_access_key_id || secrets. AWS_ACCESS_KEY_ID }}
41+ AWS_SECRET_ACCESS_KEY : ${{ secrets.aws_secret_access_key || secrets. AWS_SECRET_ACCESS_KEY }}
42+ GITHUB_OWNER : ${{ inputs.gh_owner || vars.OWNER }}
43+ GITHUB_APP_ID : ${{ inputs.gh_app_id || vars.APP_ID }}
44+ GITHUB_APP_INSTALLATION_ID : ${{ inputs.gh_app_installation_id || vars.APP_INSTALLATION_ID }}
45+ GITHUB_APP_PEM_FILE : ${{ secrets.gh_app_pem_file || secrets. APP_PEM_FILE }}
46+ TF_WORKSPACE : ${{ inputs.gh_owner || vars.OWNER }}
47+ TF_VAR_path : ${{ inputs.path || ' test.yaml' }}
2148
2249jobs :
2350 terraform :
Original file line number Diff line number Diff line change @@ -99,7 +99,29 @@ repositories:
9999Create GitHub workflow planning and applying configuration changes to the GitHub Organization:
100100
101101` ` ` yaml
102- # TODO
102+ ---
103+ on :
104+ push :
105+ branches :
106+ - main
107+ pull_request :
108+ branches :
109+ - main
110+
111+ jobs :
112+ call-terraform :
113+ uses : xebis/github-organization-as-code/.github/workflows/terraform.yaml@v0
114+ with :
115+ aws_region : ${{ vars.AWS_REGION }}
116+ aws_endpoint_url_s3 : ${{ vars.AWS_ENDPOINT_URL_S3 }}
117+ gh_owner : ${{ vars.GH_OWNER }}
118+ gh_app_id : ${{ vars.GH_APP_ID }}
119+ gh_app_installation_id : ${{ vars.GH_APP_INSTALLATION_ID }}
120+ path : xebis.yaml
121+ secrets :
122+ aws_access_key_id : ${{ secrets.AWS_ACCESS_KEY_ID }}
123+ aws_secret_access_key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
124+ gh_app_pem_file : ${{ secrets.GH_APP_PEM_FILE }}
103125` ` `
104126
105127Set up GitHub actions, variables and secrets:
You can’t perform that action at this time.
0 commit comments