Skip to content

Commit 39e86fe

Browse files
committed
ci: only release on successful translations run
1 parent b264fe7 commit 39e86fe

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

.github/chainguard/prepare_release.sts.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ claim_pattern:
44
workflow_ref: shopware/SwagLanguagePack/.github/workflows/prepare_release.yml@.*
55

66
permissions:
7+
actions: read
78
contents: write

.github/workflows/prepare_release.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,21 @@ jobs:
2727
ref: ${{ matrix.RELEASE_BRANCH }}
2828
token: ${{ steps.octo-sts.outputs.token }}
2929
fetch-depth: 0
30+
- name: Check translations workflow success
31+
shell: bash
32+
env:
33+
BRANCH: ${{ github.ref_name }}
34+
GH_TOKEN: ${{ steps.octo-sts.outputs.token }}
35+
run: |
36+
LATEST_RUN=$(gh run list --workflow translations.yml --branch "$BRANCH" --limit 1 --json conclusion,url --jq '.[0]')
37+
CONCLUSION=$(jq -r '.conclusion' <<<"$LATEST_RUN")
38+
URL=$(jq -r '.url' <<<"$LATEST_RUN")
39+
40+
if [[ "$CONCLUSION" != "success" ]]; then
41+
echo "::error::The latest run of "Translations" on \"$BRANCH\" was not successful (Status: $CONCLUSION)."
42+
echo "::error::Check $URL for details."
43+
exit 1
44+
fi
3045
- name: Check for changes
3146
shell: bash
3247
id: check-changes

0 commit comments

Comments
 (0)