From 3d0ce17a8cacfcb33e4adbcc7842b6ce9d6d111b Mon Sep 17 00:00:00 2001 From: purian23 Date: Wed, 15 Jul 2026 16:18:36 -0400 Subject: [PATCH] refactor: update workfows & issue notes port 1.5 (cherry picked from commit 358496134c6f47131f75631639edc8af9a3e7aab) --- .github/workflows/dms-stable.yml | 4 ++-- .github/workflows/point-release.yml | 13 +++++++++++-- .github/workflows/port.yml | 2 +- .github/workflows/update-vendor-hash.yml | 2 +- scripts/notify-issues.sh | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/dms-stable.yml b/.github/workflows/dms-stable.yml index a8f65d7fd..8f67257e6 100644 --- a/.github/workflows/dms-stable.yml +++ b/.github/workflows/dms-stable.yml @@ -17,7 +17,7 @@ jobs: steps: - name: Create GitHub App token id: app_token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@v3 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} @@ -51,7 +51,7 @@ jobs: steps: - name: Create GitHub App token id: app_token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@v3 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} diff --git a/.github/workflows/point-release.yml b/.github/workflows/point-release.yml index 7abd2b487..74aa9ce04 100644 --- a/.github/workflows/point-release.yml +++ b/.github/workflows/point-release.yml @@ -43,7 +43,7 @@ jobs: - name: Create GitHub App token id: app_token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@v3 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} @@ -55,6 +55,15 @@ jobs: fetch-depth: 0 token: ${{ steps.app_token.outputs.token }} + - name: Preflight — verify Release workflow is dispatchable + env: + GH_TOKEN: ${{ github.token }} + run: | + set -euo pipefail + gh api "repos/${{ github.repository }}/actions/workflows/release.yml" \ + --jq '.state' | grep -qx active || + { echo "::error::release.yml is not dispatchable; aborting before any push"; exit 1; } + - name: Port audit (informational) env: GH_TOKEN: ${{ steps.app_token.outputs.token }} @@ -83,7 +92,7 @@ jobs: - name: Dispatch Release workflow env: - GH_TOKEN: ${{ steps.app_token.outputs.token }} + GH_TOKEN: ${{ github.token }} run: | gh workflow run release.yml --ref "${{ steps.derive.outputs.tag }}" \ -f tag="${{ steps.derive.outputs.tag }}" \ diff --git a/.github/workflows/port.yml b/.github/workflows/port.yml index 5747a58b5..0f802db67 100644 --- a/.github/workflows/port.yml +++ b/.github/workflows/port.yml @@ -28,7 +28,7 @@ jobs: steps: - name: Create GitHub App token id: app_token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@v3 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} diff --git a/.github/workflows/update-vendor-hash.yml b/.github/workflows/update-vendor-hash.yml index 7617f16d9..d42b7fec9 100644 --- a/.github/workflows/update-vendor-hash.yml +++ b/.github/workflows/update-vendor-hash.yml @@ -18,7 +18,7 @@ jobs: steps: - name: Create GitHub App token id: app_token - uses: actions/create-github-app-token@v2 + uses: actions/create-github-app-token@v3 with: app-id: ${{ secrets.APP_ID }} private-key: ${{ secrets.APP_PRIVATE_KEY }} diff --git a/scripts/notify-issues.sh b/scripts/notify-issues.sh index c900ece59..541a8a3ec 100755 --- a/scripts/notify-issues.sh +++ b/scripts/notify-issues.sh @@ -48,7 +48,7 @@ for n in $refs; do gh issue comment "$n" --repo "$REPO" --body "$(cat <