You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by da...@apache.org on 2024/09/09 16:59:09 UTC
(kafka) 01/04: add conditions to steps
This is an automated email from the ASF dual-hosted git repository.
davidarthur pushed a commit to branch gh-test-build-scan-comment
in repository https://gitbox.apache.org/repos/asf/kafka.git
commit eb3a652883156d24b22085627e297bdef600a8cf
Author: David Arthur <mu...@gmail.com>
AuthorDate: Mon Sep 9 12:47:43 2024 -0400
add conditions to steps
---
.github/workflows/ci-complete.yml | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci-complete.yml b/.github/workflows/ci-complete.yml
index 0b808dd3290..30cd895a338 100644
--- a/.github/workflows/ci-complete.yml
+++ b/.github/workflows/ci-complete.yml
@@ -60,7 +60,10 @@ jobs:
with:
java-version: ${{ matrix.java }}
develocity-access-key: ${{ secrets.GE_ACCESS_TOKEN }}
- - uses: actions/download-artifact@v4
+ - name: Download build scan archive
+ id: download-build-scan
+ uses: actions/download-artifact@v4
+ continue-on-error: true
with:
github-token: ${{ github.token }}
run-id: ${{ github.event.workflow_run.id }}
@@ -68,13 +71,15 @@ jobs:
path: ~/.gradle/build-scan-data # This is where Gradle buffers unpublished build scan data when --no-scan is given
- name: Publish Scan
id: publish-build-scan
+ continue-on-error: true
+ if: ${{ steps.download-build-scan.outcome == 'success' }}
run: |
./gradlew --info buildScanPublishPrevious > gradle.out
SCAN_URL=$(grep '^https://.*$' gradle.out)
echo "Published build scan to $SCAN_URL"
echo "build-scan-url=$SCAN_URL" >> $GITHUB_OUTPUT
- name: Handle failed publish
- if: failure()
+ if: ${{ steps.publish-build-scan.outcome == 'failure' }}
uses: ./.github/actions/gh-api-update-status
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
@@ -85,6 +90,7 @@ jobs:
context: 'Gradle Build Scan / Java ${{ matrix.java }}'
state: 'error'
- name: Update Status Check
+ if: ${{ steps.publish-build-scan.outcome == 'success' }}
uses: ./.github/actions/gh-api-update-status
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}