Repository navigation
71 lines (62 loc) · 2.41 KB
/
Copy pathupdate-elements.yml
File metadata and controls
71 lines (62 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
name: update-elements
on:
schedule:
- cron: "17 4 * * 1" # weekly, Monday 04:17 UTC
workflow_dispatch:
inputs:
allow_major:
description: "Allow major-version bumps for git refs"
type: boolean
default: false
allow_bootc:
description: "Track bootc (regenerates its pinned cargo2 crates)"
type: boolean
default: false
permissions: {}
jobs:
update:
runs-on: ubuntu-26.04
timeout-minutes: 30
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Recompute pinned source hashes and refs
env:
ALLOW_MAJOR: ${{ inputs.allow_major }}
run: |
if [ "$ALLOW_MAJOR" = "true" ]; then
python3 scripts/update_pins.py --allow-major
else
python3 scripts/update_pins.py
fi
git diff --stat
# The bootc element's cargo2 source pins ~1500 crates from its
# Cargo.lock. Only BuildStream's tracker can regenerate them safely.
- uses: taiki-e/install-action@v2
if: inputs.allow_bootc
with:
tool: just
- name: Track bootc source and cargo pins
if: inputs.allow_bootc
run: just bst source track mgmt/bootc.bst
- name: Open or update pull request
uses: peter-evans/create-pull-request@3ffccacd46053766916f087ce41d627c0b8cf2d1 # v8
with:
# Falls back to GITHUB_TOKEN, which requires "Allow GitHub Actions
# to create and approve pull requests" in the repo settings. A PAT
# with repo scope can be supplied as ELEMENT_UPDATE_TOKEN instead.
token: ${{ secrets.ELEMENT_UPDATE_TOKEN || secrets.GITHUB_TOKEN }}
branch: automation/update-elements
delete-branch: true
title: "chore: update pinned element sources"
body: |
Automated weekly refresh of BuildStream source pins.
`scripts/update_pins.py` recomputed the sha256 values and git refs
from the version keys in `include/versions.yml`. Every download is
verified. Review the diff, then let CI rebuild and validate.
Patch/minor updates are eligible for auto-merge after CI passes;
major bumps are left for manual review.
labels: dependencies
commit-message: "chore: update pinned element sources"