Skip to content

Commit fded6c2

Browse files
[ndr-421] simplified references to workflow inputs
1 parent a87bce0 commit fded6c2

4 files changed

Lines changed: 12 additions & 12 deletions

File tree

.github/workflows/deploy-pre-prod.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Deploy - Pre-prod"
22

3-
run-name: "${{ github.event.inputs.branch_or_tag }}"
3+
run-name: "${{ inputs.branch_or_tag }}"
44

55
on:
66
workflow_dispatch:
@@ -21,18 +21,18 @@ jobs:
2121
name: Tag main
2222
runs-on: ubuntu-latest
2323
outputs:
24-
version: ${{ steps.versioning.outputs.tag || github.event.inputs.branch_or_tag }}
24+
version: ${{ steps.versioning.outputs.tag || inputs.branch_or_tag }}
2525
permissions: write-all
2626
steps:
2727
- name: Checkout main
28-
if: ${{ github.event.inputs.branch_or_tag == 'main' }}
28+
if: ${{ inputs.branch_or_tag == 'main' }}
2929
uses: actions/checkout@v6
3030
with:
3131
ref: main
3232
fetch-depth: "0"
3333

3434
- name: Bump version and push tag
35-
if: ${{ github.event.inputs.branch_or_tag == 'main' }}
35+
if: ${{ inputs.branch_or_tag == 'main' }}
3636
id: versioning
3737
uses: anothrNick/github-tag-action@1.64.0
3838
env:
@@ -42,7 +42,7 @@ jobs:
4242

4343
- name: View outputs
4444
run: |
45-
echo Tag to deploy: ${{ steps.versioning.outputs.tag || github.event.inputs.branch_or_tag }}
45+
echo Tag to deploy: ${{ steps.versioning.outputs.tag || inputs.branch_or_tag }}
4646
4747
terraform_plan_apply_base_iam:
4848
name: Terraform Plan/Apply base-iam (pre-prod)

.github/workflows/deploy-prod.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Deploy - Prod"
22

3-
run-name: "${{ github.event.inputs.git_tag }}"
3+
run-name: "${{ inputs.git_tag }}"
44

55
on:
66
workflow_dispatch:
@@ -48,7 +48,7 @@ jobs:
4848
- name: Checkout Tag
4949
uses: actions/checkout@v6
5050
with:
51-
ref: refs/tags/${{ github.event.inputs.git_tag}}
51+
ref: refs/tags/${{ inputs.git_tag}}
5252
fetch-depth: "0"
5353

5454
- name: Apply Main

.github/workflows/deploy-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: "Deploy - Test"
22

3-
run-name: "${{ github.event.inputs.git_ref }}"
3+
run-name: "${{ inputs.git_ref }}"
44

55
on:
66
workflow_dispatch:
@@ -24,7 +24,7 @@ jobs:
2424
- name: Checkout branch
2525
uses: actions/checkout@v6
2626
with:
27-
ref: ${{ github.event.inputs.git_ref}}
27+
ref: ${{ inputs.git_ref}}
2828

2929
- name: Apply base_iam
3030
uses: ./.github/actions/tf-plan-apply

.github/workflows/tool-rename-git-tag.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: 'Tool: Rename Git Tag'
22

3-
run-name: "${{ github.event.inputs.old_tag }} -> ${{ github.event.inputs.new_tag }}"
3+
run-name: "${{ inputs.old_tag }} -> ${{ inputs.new_tag }}"
44

55
on:
66
workflow_dispatch:
@@ -29,7 +29,7 @@ jobs:
2929
- name: Checkout
3030
uses: actions/checkout@v6
3131
with:
32-
ref: ${{ github.event.inputs.old_tag }}
32+
ref: ${{ inputs.old_tag }}
3333
fetch-depth: 0
3434

3535
- name: Check SHA
@@ -49,6 +49,6 @@ jobs:
4949
github.rest.git.createRef({
5050
owner: context.repo.owner,
5151
repo: context.repo.repo,
52-
ref: 'refs/tags/${{ github.event.inputs.new_tag }}',
52+
ref: 'refs/tags/${{ inputs.new_tag }}',
5353
sha: '${{ steps.get-sha.outputs.BRANCH_SHA }}'
5454
})

0 commit comments

Comments
 (0)