Skip to content

Commit e00ddff

Browse files
committed
ci: add weekly flake and Jenkins plugin update workflow
Signed-off-by: Henri Rosten <henri.rosten@unikie.com>
1 parent 43434b8 commit e00ddff

File tree

1 file changed

+78
-0
lines changed

1 file changed

+78
-0
lines changed
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
# SPDX-FileCopyrightText: 2026 TII (SSRC) and the Ghaf contributors
2+
#
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
name: Update flake inputs and Jenkins plugins
6+
7+
on:
8+
schedule:
9+
# 06:00 EET (UTC+2) every Monday
10+
- cron: "0 4 * * 1"
11+
workflow_dispatch:
12+
13+
permissions:
14+
contents: read
15+
16+
concurrency:
17+
group: ${{ github.workflow }}-${{ github.ref }}
18+
cancel-in-progress: true
19+
20+
jobs:
21+
update-flake-inputs:
22+
name: Update flake inputs and Jenkins plugins
23+
runs-on: ubuntu-latest
24+
permissions:
25+
contents: read # Only required for checkout; branch/PR writes use AUTOMATION_TOKEN.
26+
steps:
27+
- name: Harden the runner (Audit all outbound calls)
28+
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e
29+
with:
30+
egress-policy: audit
31+
32+
- name: Checkout
33+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
34+
with:
35+
ref: ${{ github.event.repository.default_branch }}
36+
fetch-depth: 0
37+
persist-credentials: false
38+
39+
- name: Install nix
40+
uses: cachix/install-nix-action@2126ae7fc54c9df00dd18f7f18754393182c73cd
41+
42+
- name: Update all flake inputs
43+
shell: bash
44+
run: nix flake update
45+
46+
- name: Update Jenkins plugins
47+
shell: bash
48+
run: |
49+
set -euo pipefail
50+
nix develop -c bash -lc '
51+
# Load shellHook-defined helpers (like update-jenkins-plugins) in this CI shell.
52+
source <(nix print-dev-env)
53+
update-jenkins-plugins hosts/hetzci
54+
update-jenkins-plugins hosts/uae/azureci
55+
'
56+
57+
- name: Create or update pull request
58+
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0
59+
with:
60+
token: ${{ secrets.AUTOMATION_TOKEN }}
61+
base: ${{ github.event.repository.default_branch }}
62+
branch: automation/update-flake-inputs
63+
add-paths: |
64+
flake.lock
65+
hosts/hetzci/plugins.json
66+
hosts/uae/azureci/plugins.json
67+
committer: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
68+
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
69+
commit-message: |
70+
flake.lock: Update flake inputs and Jenkins plugins
71+
72+
Automated update of flake inputs and Jenkins plugins.
73+
signoff: true
74+
title: "flake.lock: Update flake inputs and Jenkins plugins"
75+
body: |
76+
This PR updates all flake inputs in `flake.lock` and refreshes Jenkins plugins manifests:
77+
- `hosts/hetzci/plugins.json`
78+
- `hosts/uae/azureci/plugins.json`

0 commit comments

Comments
 (0)