Skip to content

Commit dda1ddf

Browse files
committed
feat: change github variable names and the workflow step names
1 parent 22cc4ed commit dda1ddf

File tree

2 files changed

+13
-12
lines changed

2 files changed

+13
-12
lines changed

.github/workflows/terraform.yaml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -39,11 +39,11 @@ env:
3939
AWS_ENDPOINT_URL_S3: ${{ inputs.aws_endpoint_url_s3 || vars.AWS_ENDPOINT_URL_S3 }}
4040
AWS_ACCESS_KEY_ID: ${{ secrets.aws_access_key_id || secrets.AWS_ACCESS_KEY_ID }}
4141
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 }}
42+
GITHUB_OWNER: ${{ inputs.gh_owner || vars.GH_OWNER }}
43+
GITHUB_APP_ID: ${{ inputs.gh_app_id || vars.GH_APP_ID }}
44+
GITHUB_APP_INSTALLATION_ID: ${{ inputs.gh_app_installation_id || vars.GH_APP_INSTALLATION_ID }}
45+
GITHUB_APP_PEM_FILE: ${{ secrets.gh_app_pem_file || secrets.GH_APP_PEM_FILE }}
46+
TF_WORKSPACE: ${{ inputs.gh_owner || vars.GH_OWNER }}
4747
TF_VAR_path: iac/${{ inputs.path || 'test.yaml' }}
4848

4949
jobs:
@@ -67,7 +67,7 @@ jobs:
6767
sparse-checkout: ${{ inputs.path || 'test.yaml' }}
6868
sparse-checkout-cone-mode: false
6969

70-
- name: Setup Terraform with specified version on the runner
70+
- name: Setup Terraform with specified version
7171
uses: hashicorp/setup-terraform@v3
7272
with:
7373
terraform_version: 1.11.0
@@ -82,7 +82,8 @@ jobs:
8282
run: terraform plan -no-color -input=false
8383
continue-on-error: true
8484

85-
- uses: actions/github-script@v7
85+
- name: Terraform plan as the PR comment
86+
uses: actions/github-script@v7
8687
if: github.event_name == 'pull_request'
8788
env:
8889
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}"
@@ -131,10 +132,10 @@ jobs:
131132
body: output
132133
});
133134
134-
- name: Terraform Plan Status
135+
- name: Terraform plan status
135136
if: steps.plan.outcome == 'failure'
136137
run: exit 1
137138

138-
- name: Terraform Apply
139+
- name: Terraform apply
139140
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
140141
run: terraform apply -auto-approve -input=false

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -137,11 +137,11 @@ Set up GitHub actions, variables and secrets:
137137
- `AWS_SECRET_ACCESS_KEY`
138138
- Variables
139139
- **New repository variable**
140-
- `APP_ID` (`GITHUB_APP_ID`)
141-
- `APP_INSTALLATION_ID` (`GITHUB_APP_INSTALLATION_ID`)
140+
- `GH_APP_ID` (`GITHUB_APP_ID`)
141+
- `GH_APP_INSTALLATION_ID` (`GITHUB_APP_INSTALLATION_ID`)
142142
- `AWS_ENDPOINT_URL_S3`
143143
- `AWS_REGION`
144-
- `OWNER` (`GITHUB_OWNER`)
144+
- `GH_OWNER` (`GITHUB_OWNER`)
145145

146146
## Usage
147147

0 commit comments

Comments
 (0)