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>
81 lines
2.7 KiB
YAML
81 lines
2.7 KiB
YAML
name: Teams
|
|
|
|
on:
|
|
schedule:
|
|
# Every Tuesday at 19:42 (randomly chosen)
|
|
- cron: '42 19 * * 1'
|
|
workflow_dispatch:
|
|
|
|
permissions: {}
|
|
|
|
defaults:
|
|
run:
|
|
shell: bash
|
|
|
|
jobs:
|
|
sync:
|
|
if: github.event_name != 'schedule' || github.repository_owner == 'NixOS'
|
|
runs-on: ubuntu-slim
|
|
steps:
|
|
# Use a GitHub App to create the PR so that CI gets triggered and to
|
|
# request team member lists.
|
|
- 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-administration: read
|
|
permission-contents: write
|
|
permission-members: read
|
|
permission-pull-requests: write
|
|
|
|
- name: Fetch source
|
|
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
|
|
with:
|
|
persist-credentials: false
|
|
sparse-checkout: |
|
|
ci/github-script
|
|
maintainers/github-teams.json
|
|
|
|
- name: Install dependencies
|
|
run: npm install bottleneck@2.19.5
|
|
|
|
- name: Synchronise teams
|
|
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
with:
|
|
github-token: ${{ steps.app-token.outputs.token }}
|
|
script: |
|
|
require('./ci/github-script/get-teams.js')({
|
|
github,
|
|
context,
|
|
core,
|
|
outFile: "maintainers/github-teams.json"
|
|
})
|
|
|
|
- name: Get GitHub App User Git String
|
|
id: user
|
|
env:
|
|
GH_TOKEN: ${{ steps.app-token.outputs.token }}
|
|
APP_SLUG: ${{ steps.app-token.outputs.app-slug }}
|
|
run: |
|
|
name="${APP_SLUG}[bot]"
|
|
userId=$(gh api "/users/$name" --jq .id)
|
|
email="$userId+$name@users.noreply.github.com"
|
|
echo "git-string=$name <$email>" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Create Pull Request
|
|
uses: peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
|
|
with:
|
|
token: ${{ steps.app-token.outputs.token }}
|
|
add-paths: maintainers/github-teams.json
|
|
author: ${{ steps.user.outputs.git-string }}
|
|
committer: ${{ steps.user.outputs.git-string }}
|
|
commit-message: "maintainers/github-teams.json: Automated sync"
|
|
branch: pr/github-team-sync
|
|
title: "maintainers/github-teams.json: Automated sync"
|
|
body: |
|
|
This is an automated PR to sync the GitHub teams with access to this repository to the `lib.teams` list.
|
|
|
|
This PR can be merged without taking any further action.
|
|
|