Skip to content
Merged
Show file tree
Hide file tree
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
24 changes: 2 additions & 22 deletions .github/workflows/actions.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,6 @@
# Docs: https://gh.io/actions-lockfile
version: 'v0.0.3'
workflows:
'.github/workflows/housekeeping.yml':
- 'actions/checkout@v6.0.2'
- 'hashintel/actions@main'
'.github/workflows/preflight-target.yml': []
'.github/workflows/housekeeping.yml': []
'.github/workflows/preflight-edit.yml': []
'.github/workflows/preflight.yml': []
dependencies:
'actions/checkout@v6.0.2':
ref: 'v6.0.2'
commit: 'sha1-de0fac2e4500dabe0009e67214ff5f5447ce83dd'
owner_id: 44036562
repo_id: 197814629
'actions/setup-node@v7.1.0':
ref: 'v7.1.0'
commit: 'sha1-949feb2413d6458794dcd2491c4babbbce0c15c1'
owner_id: 44036562
repo_id: 189476904
'hashintel/actions@main':
ref: 'main'
commit: 'sha1-06238755f2364521d75a1eaf0b3b397261f46077'
owner_id: 22116112
repo_id: 1389230708
uses:
- 'actions/setup-node@v7.1.0'
41 changes: 16 additions & 25 deletions .github/workflows/housekeeping.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Housekeeping

on:
pull_request:
paths:
- ".github/workflows/housekeeping.yml"
- ".github/renovate.json"
schedule:
- cron: "0 3 * * *"
workflow_dispatch:
Expand Down Expand Up @@ -40,38 +36,33 @@ on:
- lookup
- full

# A new run waits for the running one instead of cancelling it, so a Renovate
# run on `main` always finishes.
concurrency:
group: ${{ github.workflow }}-caller
cancel-in-progress: false

permissions: {}

jobs:
validate:
name: Validate
if: github.event_name == 'pull_request'
runs-on: ubuntu-26.04
permissions:
contents: read
steps:
- name: Checkout
uses: actions/checkout@v6.0.2

- name: Install Renovate
uses: hashintel/actions/.github/actions/install-renovate@main

- name: Validate Renovate config
run: renovate-config-validator --strict

renovate:
name: Dependencies
if: github.event_name != 'pull_request'
permissions:
actions: read
actions: read # Renovate downloads its repository cache artifact
contents: read
id-token: write
uses: hashintel/actions/.github/workflows/housekeeping-dependencies.yml@06238755f2364521d75a1eaf0b3b397261f46077 # main
id-token: write # Vault JWT login that mints the Renovate installation token
uses: hashintel/actions/.github/workflows/housekeeping-dependencies.yml@13a244f21ce0aed2840fbd16b8cbe934521d3c43 # main
with:
vault-role: ci-hashintel-blocks-renovate
environment: Renovate
repoCache: ${{ inputs.repoCache || 'enabled' }}
logLevel: ${{ inputs.logLevel || 'info' }}
overrideSchedule: ${{ inputs.overrideSchedule || false }}
dryRun: ${{ inputs.dryRun || 'disabled' }}
secrets:
CF_ACCESS_STAGE_CLIENT_SECRET: ${{ secrets.CF_ACCESS_STAGE_CLIENT_SECRET }}
# Only in the `Renovate` environment of the called jobs; a called workflow gets only the secrets its caller names.
# jactionlint ignore=secrets-outside-env
CF_ACCESS_CLIENT_SECRET: ${{ secrets.CF_ACCESS_CLIENT_SECRET }}
# Only in the `Renovate` environment of the called jobs; a called workflow gets only the secrets its caller names.
# jactionlint ignore=secrets-outside-env
RENOVATE_TOKEN_ENC_KEY: ${{ secrets.RENOVATE_TOKEN_ENC_KEY }}
28 changes: 28 additions & 0 deletions .github/workflows/preflight-edit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Preflight

on:
pull_request:
# `edited` matters: the todo-comments scan and the PR title check read the PR title.
types: [opened, synchronize, reopened, edited]
merge_group:

# A called workflow reads the caller's `github.workflow`, so its group is `Preflight-preflight-<check>-…`.
# This group must match neither those nor the group of `preflight.yml`, which has the same name.
concurrency:
group: preflight-edit-caller-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
todo-comments:
name: Todo comments
permissions:
contents: read
uses: hashintel/actions/.github/workflows/preflight-todo-comments.yml@13a244f21ce0aed2840fbd16b8cbe934521d3c43 # main

pr-title:
name: PR title
permissions:
contents: read
uses: hashintel/actions/.github/workflows/preflight-pr-title.yml@13a244f21ce0aed2840fbd16b8cbe934521d3c43 # main
25 changes: 0 additions & 25 deletions .github/workflows/preflight-target.yml

This file was deleted.

21 changes: 13 additions & 8 deletions .github/workflows/preflight.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,26 @@ name: Preflight

on:
pull_request:
# `edited` matters: the todo-comments scan derives its ticket IDs from the PR title.
types: [opened, synchronize, reopened, edited]
merge_group:

# A called workflow reads the caller's `github.workflow`, so its group is `Preflight-preflight-<check>-…`.
# This group must match neither those nor the group of `preflight-edit.yml`, which has the same name.
concurrency:
group: preflight-caller-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

permissions: {}

jobs:
todo-comments:
name: Todo comments
lint:
name: Lint
permissions:
contents: read
uses: hashintel/actions/.github/workflows/preflight-todo-comments.yml@06238755f2364521d75a1eaf0b3b397261f46077 # main
uses: hashintel/actions/.github/workflows/preflight-lint.yml@13a244f21ce0aed2840fbd16b8cbe934521d3c43 # main

lint:
name: Lint
dependencies:
name: Dependencies
permissions:
contents: read
uses: hashintel/actions/.github/workflows/preflight-lint.yml@06238755f2364521d75a1eaf0b3b397261f46077 # main
pull-requests: write # Dependency review comments its summary on the PR
uses: hashintel/actions/.github/workflows/preflight-dependencies.yml@13a244f21ce0aed2840fbd16b8cbe934521d3c43 # main
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ These requirements already existed in Labs. Once the shared tooling is available

## Repository setup

The repository uses HASH's shared PR checks and Renovate workflow. Scheduled dependency updates require access to the `VAULT_STAGE_ADDR` and `CF_ACCESS_STAGE_CLIENT_ID` organization variables, plus the `CF_ACCESS_STAGE_CLIENT_SECRET` and `RENOVATE_TOKEN_ENC_KEY` organization secrets. Pull requests validate the workflow and configuration without starting dependency updates.
The repository uses HASH's shared PR checks and Renovate workflow. Scheduled dependency updates read `VAULT_ADDR`, `CF_ACCESS_CLIENT_ID`, `CF_ACCESS_CLIENT_SECRET` and `RENOVATE_TOKEN_ENC_KEY` from the repository's `Renovate` environment, which only `main` may use. Preflight Lint validates the workflows and the Renovate configuration.

Block publishing workflows must also be configured before publishing from this repository.

Expand Down
Loading