Skip to content

Commit b161a0e

Browse files
author
Antoine THEBAUD
committed
WIP preview: replace configurable prefix by PR number
Signed-off-by: Antoine THEBAUD <antoine.thebaud@amadeus.com>
1 parent aad1ef3 commit b161a0e

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

.github/workflows/dac.yaml

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,6 @@ on:
6767
type: boolean
6868
required: false
6969
# preview-specific:
70-
prefix: # TODO should be replaced by automatic passing of PR number
71-
description: If provided, it is used to prefix the dashboard preview name.
72-
type: string
73-
required: false
7470
ttl:
7571
description: Time To Live of the dashboard preview (default "1d").
7672
type: string
@@ -129,7 +125,6 @@ jobs:
129125
with:
130126
directory: ./built
131127
project: ${{ inputs.project }}
132-
prefix: ${{ inputs.prefix }}
133128
ttl: ${{ inputs.ttl }}
134129

135130
# TODO append diff to PR

actions/preview_dashboards/action.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ inputs:
99
file:
1010
description: Path to the file that contains the resources consumed by the command (mutually exclusive with `directory`).
1111
required: false
12-
prefix:
13-
description: If provided, it is used to prefix the dashboard preview name.
14-
required: false
1512
project:
1613
description: If present, the project scope for this CLI request.
1714
required: false
@@ -26,9 +23,9 @@ runs:
2623
percli dac preview \
2724
$([[ -n "${{ inputs.directory }}" ]] && echo "-d ${{ inputs.directory }}") \
2825
$([[ -n "${{ inputs.file }}" ]] && echo "-f ${{ inputs.file }}") \
29-
$([[ -n "${{ inputs.prefix }}" ]] && echo "--prefix ${{ inputs.prefix }}") \
3026
$([[ -n "${{ inputs.project }}" ]] && echo "--project ${{ inputs.project }}") \
3127
$([[ -n "${{ inputs.ttl }}" ]] && echo "--ttl ${{ inputs.ttl }}") \
28+
--prefix "pr-${{ github.event.pull_request.number }}" \
3229
-o json \
3330
> preview_output.json
3431
shell: bash
@@ -47,4 +44,4 @@ runs:
4744
repo: context.repo.repo,
4845
issue_number: context.issue.number,
4946
body: commentBody
50-
});
47+
});

0 commit comments

Comments
 (0)