Skip to content

Commit 1214bfa

Browse files
authored
Use separate template file for release (#31)
1 parent 09c34ce commit 1214bfa

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/build-deploy-backend.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ env:
2121
KOSLI_API_TOKEN: "${{ secrets.KOSLI_PUBLIC_API_TOKEN }}"
2222
KOSLI_CLI_VERSION: "${{ vars.KOSLI_CLI_VERSION }}"
2323
KOSLI_TEMPLATE_FILE: "kosli-flow-templates/backend-template.yml"
24+
KOSLI_TEMPLATE_RELEASE_FILE: "kosli-flow-templates/backend-release-template.yml"
2425
KOSLI_ENV_PROD: "github-release-example-prod"
2526

2627
# KOSLI_DRY_RUN: true
@@ -42,16 +43,18 @@ jobs:
4243
run: |
4344
if [[ "${GITHUB_REF}" == refs/tags/* ]]; then
4445
echo "kosli-trail=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT
46+
echo "TEMPLATE_FILE=${{ env.KOSLI_TEMPLATE_RELEASE_FILE }}" >> $GITHUB_ENV
4547
else
4648
echo "kosli-trail=${GITHUB_SHA}" >> $GITHUB_OUTPUT
49+
echo "TEMPLATE_FILE=${{ env.KOSLI_TEMPLATE_FILE }}" >> $GITHUB_ENV
4750
fi
4851
4952
- name: Begin trail
5053
if: ${{ github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/tags/') }}
5154
uses: ./.github/actions/kosli-begin-trail
5255
with:
5356
kosli-trail: ${{ steps.set-kosli-trail.outputs.kosli-trail }}
54-
kosli-template-file: ${{ env.KOSLI_TEMPLATE_FILE }}
57+
kosli-template-file: ${{ env.TEMPLATE_FILE }}
5558

5659

5760
build:
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 1
2+
trail:
3+
attestations:
4+
- name: pull-request
5+
type: pull_request
6+
artifacts:
7+
- name: backend
8+
attestations:
9+
- name: release-approval
10+
type: custom:approval-github-workflow

0 commit comments

Comments
 (0)