Skip to content

CI: (deps): Bump dask from 2025.12.0 to 2026.1.1 in /ci #3146

CI: (deps): Bump dask from 2025.12.0 to 2026.1.1 in /ci

CI: (deps): Bump dask from 2025.12.0 to 2026.1.1 in /ci #3146

Workflow file for this run

name: Backport PRs
on:
pull_request_target:
types:
- closed
- labeled
jobs:
Backport:
environment:
name: PR Backport
runs-on: ubuntu-slim
if: github.event.pull_request.merged && contains( github.event.pull_request.labels.*.name, 'backport' )
permissions:
pull-requests: write
contents: write
env:
GH_BASE_SHA: ${{ github.event.pull_request.base.sha }}
GH_HEAD_SHA: ${{ github.event.pull_request.head.sha }}
steps:
- name: Create App Token
uses: actions/create-github-app-token@v2
id: app-token
with:
app-id: ${{ vars.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
- name: Get GitHub App User ID
id: get-user-id
run: echo "user-id=$(gh api "/users/${{ steps.app-token.outputs.app-slug }}[bot]" --jq .id)" >> "$GITHUB_OUTPUT"
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Configure Git
run: |
git config --global user.name '${{ steps.app-token.outputs.app-slug }}[bot]'
git config --global user.email '${{ steps.get-user-id.outputs.user-id }}+${{ steps.app-token.outputs.app-slug }}[bot]@users.noreply.github.com'
- name: Checkout PR HEAD
uses: actions/checkout@v6
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 100
- name: Fetch PR merge base
run: git fetch --no-tags --depth=100 origin "$GH_BASE_SHA"
- name: Get backport branch
id: get-branch
run: |
git fetch --no-tags --depth=100 origin 'refs/heads/*.x:refs/remotes/origin/*.x'
echo "backport-branch=$(git branch -r | grep '.*.x' | sort -V | tail -n 1 | cut -d / -f 2)" >> $GITHUB_OUTPUT
- name: Apply PR commits to ${{ steps.get-branch.outputs.backport-branch}} branch
run: |
git checkout -b ${{ steps.get-branch.outputs.backport-branch}} origin/${{ steps.get-branch.outputs.backport-branch}}
git cherry-pick -x "$GH_BASE_SHA".."$GH_HEAD_SHA"
- name: Create backport PR
id: create-pr
uses: peter-evans/create-pull-request@v8
with:
token: ${{ steps.app-token.outputs.token }}
title: '${{ github.event.pull_request.title }} (backport)'
body: >
Backport \#${{ github.event.number }} onto the
${{ steps.get-branch.outputs.backport-branch}} stable branch.
base: ${{ steps.get-branch.outputs.backport-branch}}
branch: backport-pr-${{ github.event.number }}
delete-branch: true
labels: 'backported-pr,${{ join(github.event.pull_request.labels.*.name) }}'
- uses: actions-ecosystem/action-remove-labels@v1
with:
number: ${{ steps.create-pr.outputs.pull-request-number }}
labels: backport
- name: Comment on completion
uses: actions/github-script@v8
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '🏁 Successfully backported as #${{ steps.create-pr.outputs.pull-request-number }}. 🏁'
})
- name: Comment on error
if: failure()
uses: actions/github-script@v8
with:
script: |
const workflow_url = `${process.env.GITHUB_SERVER_URL}/${process.env.GITHUB_REPOSITORY}/actions/runs/${process.env.GITHUB_RUN_ID}`;
body = `🚨 Unable to [cleanly backport](${workflow_url}) this PR! 🚨`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
})