Skip to content

Commit c2bfe5b

Browse files
committed
docs: add notes on migrating to new version
Signed-off-by: AtomicFS <vojtech.vesely@9elements.com>
1 parent 652ca30 commit c2bfe5b

File tree

5 files changed

+300
-0
lines changed

5 files changed

+300
-0
lines changed

docs/src/SUMMARY.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- [Change detection](firmware-action/change_detection.md)
2828
- [Migration instructions]()
2929
- [Migration from v0.13.x to v0.14.0](firmware-action/migration/v0.13.x--v0.14.0/migrate.md)
30+
- [Migration from v0.14.x to v0.15.0](firmware-action/migration/v0.14.x--v0.15.0/migrate.md)
3031

3132
---
3233

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Migration guide from v0.14.x to v0.15.0
2+
3+
Drop-in replacement, should work out of the box. But there are many simplifications and quality of life improvements you might want to check out.
4+
5+
Most important being the optional automatic handling of caches and artifacts. This can greatly simplify your workflows.
6+
7+
```patch
8+
{{#include ./workflow.yml.patch}}
9+
```
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
---
2+
name: linuxboot build
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
build-coreboot-linuxboot-example:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: 'recursive'
17+
- name: Fetch few missing submodules
18+
run: |
19+
git submodule update --depth 1 --init --recursive --checkout
20+
21+
- name: firmware-action
22+
uses: 9elements/firmware-action@v0.15.0
23+
with:
24+
config: 'coreboot-linuxboot-example.json'
25+
target: 'coreboot-example-with-linuxboot'
26+
recursive: 'true'
27+
debug: 'true'
28+
auto-cache: 'true'
29+
auto-artifact-download: 'true'
30+
auto-artifact-upload: 'true'
Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
---
2+
name: linuxboot build
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
build-coreboot-linuxboot-example:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: 'recursive'
17+
- name: Fetch few missing submodules
18+
run: |
19+
git submodule update --depth 1 --init --recursive --checkout
20+
21+
#==================================
22+
# Get commit hashes for submodules
23+
#==================================
24+
25+
- name: Extract uroot commit sha
26+
id: uroot_commit
27+
run: |
28+
echo "uroot_commit=$( git rev-parse HEAD:coreboot-linuxboot-example/u-root )" >> "${GITHUB_OUTPUT}"
29+
30+
- name: Extract Linux commit sha
31+
id: linux_commit
32+
run: |
33+
echo "linux_commit=$( git rev-parse HEAD:coreboot-linuxboot-example/linux )" >> "${GITHUB_OUTPUT}"
34+
35+
- name: Extract Coreboot commit sha
36+
id: coreboot_commit
37+
run: |
38+
echo "coreboot_commit=$( git rev-parse HEAD:coreboot-linuxboot-example/coreboot )" >> "${GITHUB_OUTPUT}"
39+
40+
#===============
41+
# Restore cache
42+
#===============
43+
44+
- name: Restore cached u-root artefact
45+
uses: actions/cache/restore@v4
46+
id: cache-uroot
47+
with:
48+
path: output-linuxboot-uroot
49+
key: uroot-${{ steps.uroot_commit.outputs.uroot_commit }}-${{ hashFiles('coreboot-linuxboot-example.json') }}
50+
51+
- name: Restore cached Linux artefact
52+
uses: actions/cache/restore@v4
53+
id: cache-linux
54+
with:
55+
path: output-linuxboot-linux
56+
key: linux-${{ steps.linux_commit.outputs.linux_commit }}-${{ hashFiles('coreboot-linuxboot-example.json', 'coreboot-linuxboot-example/linux_defconfig', 'output-linuxboot-uroot/*') }}
57+
58+
- name: Restore cached coreboot artefact
59+
uses: actions/cache/restore@v4
60+
id: cache-coreboot
61+
with:
62+
path: output-linuxboot-coreboot
63+
key: coreboot-${{ steps.coreboot_commit.outputs.coreboot_commit }}-${{ hashFiles('coreboot-linuxboot-example.json', 'coreboot-linuxboot-example/coreboot_linuxboot_defconfig', 'output-linuxboot-linux/*') }}
64+
65+
#============================
66+
# Build with firmware-action
67+
#============================
68+
69+
- name: firmware-action
70+
uses: 9elements/firmware-action@v0.14.1
71+
with:
72+
config: 'coreboot-linuxboot-example.json'
73+
target: 'coreboot-example-with-linuxboot'
74+
recursive: 'true'
75+
76+
#==========================
77+
# Upload artifacts - uroot
78+
#==========================
79+
80+
- name: Cache u-root
81+
uses: actions/cache/save@v4
82+
if: always()
83+
with:
84+
key: uroot-${{ steps.uroot_commit.outputs.uroot_commit }}-${{ hashFiles('coreboot-linuxboot-example.json') }}
85+
path: output-linuxboot-uroot
86+
87+
- name: Upload artifacts for uroot
88+
uses: actions/upload-artifact@v4
89+
if: always()
90+
with:
91+
name: linuxboot-uroot
92+
path: output-linuxboot-uroot
93+
94+
#==========================
95+
# Upload artifacts - Linux
96+
#==========================
97+
98+
- name: Cache Linux
99+
uses: actions/cache/save@v4
100+
if: always()
101+
with:
102+
key: linux-${{ steps.linux_commit.outputs.linux_commit }}-${{ hashFiles('coreboot-linuxboot-example.json', 'coreboot-linuxboot-example/linux_defconfig', 'output-linuxboot-uroot/*') }}
103+
path: output-linuxboot-linux
104+
105+
- name: Upload artifacts for Linux
106+
uses: actions/upload-artifact@v4
107+
if: always()
108+
with:
109+
name: linuxboot-linux
110+
path: output-linuxboot-linux
111+
112+
#=============================
113+
# Upload artifacts - coreboot
114+
#=============================
115+
116+
- name: Cache coreboot
117+
uses: actions/cache/save@v4
118+
if: always()
119+
with:
120+
key: coreboot-${{ steps.coreboot_commit.outputs.coreboot_commit }}-${{ hashFiles('coreboot-linuxboot-example.json', 'coreboot-linuxboot-example/coreboot_linuxboot_defconfig', 'output-linuxboot-linux/*') }}
121+
path: output-linuxboot-coreboot
122+
123+
- name: Upload artifacts for coreboot
124+
uses: actions/upload-artifact@v4
125+
if: always()
126+
with:
127+
name: linuxboot-coreboot
128+
path: output-linuxboot-coreboot
Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
---
2+
name: linuxboot build
3+
on:
4+
push:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
build-coreboot-linuxboot-example:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
with:
16+
submodules: 'recursive'
17+
- name: Fetch few missing submodules
18+
run: |
19+
git submodule update --depth 1 --init --recursive --checkout
20+
21+
- #==================================
22+
- # Get commit hashes for submodules
23+
- #==================================
24+
-
25+
- - name: Extract uroot commit sha
26+
- id: uroot_commit
27+
- run: |
28+
- echo "uroot_commit=$( git rev-parse HEAD:coreboot-linuxboot-example/u-root )" >> "${GITHUB_OUTPUT}"
29+
-
30+
- - name: Extract Linux commit sha
31+
- id: linux_commit
32+
- run: |
33+
- echo "linux_commit=$( git rev-parse HEAD:coreboot-linuxboot-example/linux )" >> "${GITHUB_OUTPUT}"
34+
-
35+
- - name: Extract Coreboot commit sha
36+
- id: coreboot_commit
37+
- run: |
38+
- echo "coreboot_commit=$( git rev-parse HEAD:coreboot-linuxboot-example/coreboot )" >> "${GITHUB_OUTPUT}"
39+
-
40+
- #===============
41+
- # Restore cache
42+
- #===============
43+
-
44+
- - name: Restore cached u-root artefact
45+
- uses: actions/cache/restore@v4
46+
- id: cache-uroot
47+
- with:
48+
- path: output-linuxboot-uroot
49+
- key: uroot-${{ steps.uroot_commit.outputs.uroot_commit }}-${{ hashFiles('coreboot-linuxboot-example.json') }}
50+
-
51+
- - name: Restore cached Linux artefact
52+
- uses: actions/cache/restore@v4
53+
- id: cache-linux
54+
- with:
55+
- path: output-linuxboot-linux
56+
- key: linux-${{ steps.linux_commit.outputs.linux_commit }}-${{ hashFiles('coreboot-linuxboot-example.json', 'coreboot-linuxboot-example/linux_defconfig', 'output-linuxboot-uroot/*') }}
57+
-
58+
- - name: Restore cached coreboot artefact
59+
- uses: actions/cache/restore@v4
60+
- id: cache-coreboot
61+
- with:
62+
- path: output-linuxboot-coreboot
63+
- key: coreboot-${{ steps.coreboot_commit.outputs.coreboot_commit }}-${{ hashFiles('coreboot-linuxboot-example.json', 'coreboot-linuxboot-example/coreboot_linuxboot_defconfig', 'output-linuxboot-linux/*') }}
64+
-
65+
- #============================
66+
- # Build with firmware-action
67+
- #============================
68+
-
69+
- name: firmware-action
70+
- uses: 9elements/firmware-action@v0.14.1
71+
+ uses: 9elements/firmware-action@v0.15.0
72+
with:
73+
config: 'coreboot-linuxboot-example.json'
74+
target: 'coreboot-example-with-linuxboot'
75+
recursive: 'true'
76+
+ auto-cache: 'true'
77+
+ auto-artifact-download: 'true'
78+
+ auto-artifact-upload: 'true'
79+
-
80+
- #==========================
81+
- # Upload artifacts - uroot
82+
- #==========================
83+
-
84+
- - name: Cache u-root
85+
- uses: actions/cache/save@v4
86+
- if: always()
87+
- with:
88+
- key: uroot-${{ steps.uroot_commit.outputs.uroot_commit }}-${{ hashFiles('coreboot-linuxboot-example.json') }}
89+
- path: output-linuxboot-uroot
90+
-
91+
- - name: Upload artifacts for uroot
92+
- uses: actions/upload-artifact@v4
93+
- if: always()
94+
- with:
95+
- name: linuxboot-uroot
96+
- path: output-linuxboot-uroot
97+
-
98+
- #==========================
99+
- # Upload artifacts - Linux
100+
- #==========================
101+
-
102+
- - name: Cache Linux
103+
- uses: actions/cache/save@v4
104+
- if: always()
105+
- with:
106+
- key: linux-${{ steps.linux_commit.outputs.linux_commit }}-${{ hashFiles('coreboot-linuxboot-example.json', 'coreboot-linuxboot-example/linux_defconfig', 'output-linuxboot-uroot/*') }}
107+
- path: output-linuxboot-linux
108+
-
109+
- - name: Upload artifacts for Linux
110+
- uses: actions/upload-artifact@v4
111+
- if: always()
112+
- with:
113+
- name: linuxboot-linux
114+
- path: output-linuxboot-linux
115+
-
116+
- #=============================
117+
- # Upload artifacts - coreboot
118+
- #=============================
119+
-
120+
- - name: Cache coreboot
121+
- uses: actions/cache/save@v4
122+
- if: always()
123+
- with:
124+
- key: coreboot-${{ steps.coreboot_commit.outputs.coreboot_commit }}-${{ hashFiles('coreboot-linuxboot-example.json', 'coreboot-linuxboot-example/coreboot_linuxboot_defconfig', 'output-linuxboot-linux/*') }}
125+
- path: output-linuxboot-coreboot
126+
-
127+
- - name: Upload artifacts for coreboot
128+
- uses: actions/upload-artifact@v4
129+
- if: always()
130+
- with:
131+
- name: linuxboot-coreboot
132+
- path: output-linuxboot-coreboot

0 commit comments

Comments
 (0)