From c037d1fe65a88a4ab9acae157b27101525c2bd70 Mon Sep 17 00:00:00 2001 From: Kirill Sibirev Date: Thu, 12 Sep 2024 11:16:48 +0200 Subject: [PATCH] GH actions fixes (#341) * Some minor gh actions fixes * Inherit secrets --- .github/workflows/main_test.yaml | 2 +- .github/workflows/release.yaml | 1 + .github/workflows/release_nightly.yaml | 3 ++- .github/workflows/subflow_release.yaml | 5 +++-- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main_test.yaml b/.github/workflows/main_test.yaml index 2d099b15..7ddd9abd 100644 --- a/.github/workflows/main_test.yaml +++ b/.github/workflows/main_test.yaml @@ -1,4 +1,4 @@ -name: Build and test +name: Test main branch on: push: diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e67f4738..03bbe82c 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -10,5 +10,6 @@ jobs: release: name: Run release uses: ./.github/workflows/subflow_release.yaml + secrets: inherit with: release_version: ${GITHUB_REF#refs/*/release/} diff --git a/.github/workflows/release_nightly.yaml b/.github/workflows/release_nightly.yaml index d00bd50e..dda91663 100644 --- a/.github/workflows/release_nightly.yaml +++ b/.github/workflows/release_nightly.yaml @@ -1,4 +1,4 @@ -name: Build and test +name: Build nightly release on: workflow_dispatch: @@ -10,6 +10,7 @@ jobs: release: name: Run release uses: ./.github/workflows/subflow_release.yaml + secrets: inherit with: release_version: 0.0.$(git rev-list --count HEAD)-dev-${GITHUB_SHA} release_suffix: "-nightly" diff --git a/.github/workflows/subflow_release.yaml b/.github/workflows/subflow_release.yaml index 888df197..e3ca124e 100644 --- a/.github/workflows/subflow_release.yaml +++ b/.github/workflows/subflow_release.yaml @@ -69,8 +69,9 @@ jobs: disable_web_page_preview: true format: markdown message: | - Workflow *${{github.workflow}}* failed: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}. Commit: + Workflow *${{github.workflow}}* failed: ${{github.server_url}}/${{github.repository}}/actions/runs/${{github.run_id}}. + Commit: ${{github.event.head_commit.sha}} + Message: ``` ${{github.event.head_commit.message}} ``` -