Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 45 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -700,3 +700,48 @@ jobs:
is_stable: ${{ needs.compute-release-context.outputs.is_stable }}
is_active_major: ${{ needs.compute-release-context.outputs.is_active_major }}
token: ${{ steps.app-token.outputs.token }}

update-azure-pipelines-extension:
name: 🔄 Update Azure Pipelines Extension
runs-on: ubuntu-latest
needs: [compute-release-context, publish-release]
if: needs.compute-release-context.outputs.is_stable == 'true'

steps:
- name: 🔐 Create GitHub App token
id: app-token
uses: actions/create-github-app-token@1b10c78c7865c340bc4f6099eb2f838309f1e8c3 # v3
with:
app-id: ${{ secrets.ACTIONS_APP_ID }}
private-key: ${{ secrets.ACTIONS_APP_PRIVATE_KEY }}
owner: ChilliCream
repositories: nitro-azure-pipelines-tasks

- name: 🚀 Dispatch extension release workflow
id: dispatch
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
REPO: ChilliCream/nitro-azure-pipelines-tasks
VERSION: ${{ needs.compute-release-context.outputs.git_tag }}
IS_ACTIVE_MAJOR: ${{ needs.compute-release-context.outputs.is_active_major }}
shell: bash
run: |
set -euo pipefail
RUN_URL=$(gh workflow run release.yaml --repo "$REPO" --ref main \
-f version="$VERSION" \
-f is_active_major="$IS_ACTIVE_MAJOR")
if [ -z "$RUN_URL" ]; then
echo "::error::Dispatch did not return a run URL. Requires gh >= 2.87.0."
exit 1
fi
RUN_ID="${RUN_URL##*/}"
echo "run-id=$RUN_ID" >> "$GITHUB_OUTPUT"
echo "Dispatched run: $RUN_URL"

- name: 👀 Watch extension release run
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
REPO: ChilliCream/nitro-azure-pipelines-tasks
RUN_ID: ${{ steps.dispatch.outputs.run-id }}
shell: bash
run: gh run watch "$RUN_ID" --repo "$REPO" --exit-status --compact
Loading