Skip to content

ssh: remove 74 keys with no matching lab user #25

ssh: remove 74 keys with no matching lab user

ssh: remove 74 keys with no matching lab user #25

Workflow file for this run

name: Validate keys
on:
pull_request:
branches: [main]
permissions:
contents: read
jobs:
validate:
runs-on: ubuntu-latest
outputs:
eligible: ${{ steps.check.outputs.eligible }}
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
fetch-depth: 0
- name: Validate changed key files
id: check
run: |
.github/scripts/validate-keys.sh "origin/${GITHUB_BASE_REF}" HEAD
automerge:
# Auto-merge only when:
# - validation passed and the PR touches nothing but ssh/*.pub files
# - the PR branch lives in this repo (fork PRs get a read-only token)
# - the author is an owner/member/collaborator of the repo, or the
# Sepia onboarding GitHub App (apps report author_association NONE)
needs: validate
if: >-
needs.validate.outputs.eligible == 'true' &&
github.event.pull_request.draft == false &&
github.event.pull_request.head.repo.full_name == github.repository &&
(
github.event.pull_request.user.login == 'sepia-lab-onboarding-app[bot]' ||
contains(fromJSON('["OWNER", "MEMBER", "COLLABORATOR"]'),
github.event.pull_request.author_association)
)
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
steps:
- name: Merge PR
env:
GH_TOKEN: ${{ github.token }}
run: |
gh pr merge --repo "$GITHUB_REPOSITORY" --merge --delete-branch \
"${{ github.event.pull_request.number }}"
update:
# Regenerate the autogenerated branch (@all.pub etc.) after the merge.
# This runs here because pushes made with GITHUB_TOKEN do not trigger
# the push-based regenerate workflow.
needs: automerge
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: update-autogenerated
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: main
fetch-depth: 0
- name: Run update script
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config branch.main.remote origin
./update