Skip to content

Commit 58adb60

Browse files
authored
HCL auto-update on new TRH/TUC versions (#24)
1 parent a6f1200 commit 58adb60

File tree

3 files changed

+41
-3
lines changed

3 files changed

+41
-3
lines changed

.github/pull_request_template.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,2 @@
11
#### Motivation for this change and description of the change
22

3-
#### Checklist
4-
5-
- [ ] All commits have been signed

.github/workflows/update-hcls.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Automatic HCL Update in Pull Requests'
2+
3+
on:
4+
# Only run on internal pull requests
5+
pull_request:
6+
types: [opened, synchronize, reopened]
7+
8+
jobs:
9+
update-hcls:
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write
13+
steps:
14+
- name: 'Checkout repository'
15+
uses: actions/checkout@v6.0.1
16+
with:
17+
ref: '${{ github.event.pull_request.head.ref }}'
18+
- name: 'Update HCLs'
19+
shell: bash
20+
run: |
21+
set -euxo pipefail
22+
cd "${{ github.workspace }}/"
23+
./script/hcl-update.sh
24+
- name: 'Commit changes to pull request'
25+
uses: EndBug/add-and-commit@v9.1.4
26+
with:
27+
add: '["bin/packages/trh.hcl", "bin/packages/tuc.hcl"]'
28+
message: 'Hermit upgrade TUC and TRH, adding digests'
29+
author_name: 'githubactions[bot]'
30+
author_email: 'githubactions[bot]@users.noreply.github.com'

script/hcl-update.sh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env bash
2+
# update trh.hcl and tuc.hcl according to the given versions
3+
# version strings need to be manually updated in the hcl files before running
4+
# this script.
5+
6+
set -euxo pipefail
7+
8+
# shellcheck source=/dev/null
9+
source bin/activate-hermit
10+
hermit upgrade tuc trh
11+
hermit manifest add-digests bin/packages/trh.hcl bin/packages/tuc.hcl

0 commit comments

Comments
 (0)