mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.2 to 6.0.3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](de0fac2e45...df4cb1c069)
---
updated-dependencies:
- dependency-name: actions/checkout
dependency-version: 6.0.3
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
70 lines
2.5 KiB
YAML
70 lines
2.5 KiB
YAML
name: "Merge"
|
|
|
|
on:
|
|
workflow_call:
|
|
inputs:
|
|
from:
|
|
description: Branch to merge into target branch. Can also be two branches separated by space to find the merge base between them.
|
|
required: true
|
|
type: string
|
|
into:
|
|
description: Target branch to merge into.
|
|
required: true
|
|
type: string
|
|
secrets:
|
|
NIXPKGS_CI_APP_PRIVATE_KEY:
|
|
required: true
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
merge:
|
|
runs-on: ubuntu-24.04-arm
|
|
timeout-minutes: 5
|
|
steps:
|
|
# Use a GitHub App to create the PR so that CI gets triggered
|
|
# The App is scoped to Repository > Contents and Pull Requests: write for Nixpkgs
|
|
- uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
|
id: app-token
|
|
with:
|
|
client-id: ${{ vars.NIXPKGS_CI_CLIENT_ID }}
|
|
private-key: ${{ secrets.NIXPKGS_CI_APP_PRIVATE_KEY }}
|
|
permission-contents: write
|
|
permission-pull-requests: write
|
|
|
|
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: Find merge base between two branches
|
|
if: contains(inputs.from, ' ')
|
|
id: merge_base
|
|
env:
|
|
branches: ${{ inputs.from }}
|
|
run: |
|
|
# turn into bash array, split on space
|
|
read -ra branches <<< "$branches"
|
|
git fetch --shallow-since="1 month ago" origin "${branches[@]}"
|
|
merge_base="$(git merge-base "refs/remotes/origin/${branches[0]}" "refs/remotes/origin/${branches[1]}")"
|
|
echo "Found merge base: $merge_base" >&2
|
|
echo "merge_base=$merge_base" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: ${{ inputs.from }} → ${{ inputs.into }}
|
|
uses: devmasx/merge-branch@854d3ac71ed1e9deb668e0074781b81fdd6e771f # 1.4.0
|
|
with:
|
|
type: now
|
|
from_branch: ${{ steps.merge_base.outputs.merge_base || inputs.from }}
|
|
target_branch: ${{ inputs.into }}
|
|
github_token: ${{ steps.app-token.outputs.token }}
|
|
|
|
- name: Comment on failure
|
|
if: ${{ failure() }}
|
|
env:
|
|
BODY_TEXT: |
|
|
Periodic merge from `${{ inputs.from }}` into [`${{ inputs.into }}`](https://github.com/NixOS/nixpkgs/tree/${{ inputs.into }}) has [failed](https://github.com/NixOS/nixpkgs/actions/runs/${{ github.run_id }}).
|
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
run: |
|
|
gh pr comment 105153 --body "$BODY_TEXT"
|