Fix/image hardening #8
@@ -1,8 +1,10 @@
|
|||||||
name: build-image
|
name: build-image
|
||||||
|
|
||||||
|
# Only a release tag builds images: a full build takes ~25 min on the runner,
|
||||||
|
# too costly to repeat on every push to main. Recipes are still linted and
|
||||||
|
# validated on every push by ci.yml.
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
|
||||||
tags: ["v*.*.*"]
|
tags: ["v*.*.*"]
|
||||||
|
|
||||||
# Builds raw disk images of the two default-tier editions (see
|
# Builds raw disk images of the two default-tier editions (see
|
||||||
@@ -85,16 +87,6 @@ jobs:
|
|||||||
./build-image.sh --dish "$dish" --root-size ${{ matrix.root_size }}
|
./build-image.sh --dish "$dish" --root-size ${{ matrix.root_size }}
|
||||||
xz -T0 "build/$dish.img"
|
xz -T0 "build/$dish.img"
|
||||||
|
|
||||||
- name: Upload image and kickstart as artifact
|
|
||||||
if: github.ref == 'refs/heads/main'
|
|
||||||
uses: actions/upload-artifact@v3
|
|
||||||
with:
|
|
||||||
name: ${{ matrix.edition }}
|
|
||||||
path: |
|
|
||||||
build/${{ env.DISH }}.img.xz
|
|
||||||
cook/dishes/${{ env.DISH }}.cfg
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
- name: Publish image and kickstart as release
|
- name: Publish image and kickstart as release
|
||||||
if: startsWith(github.ref, 'refs/tags/')
|
if: startsWith(github.ref, 'refs/tags/')
|
||||||
uses: https://git.phyllo.me/devops/action-gh-release@v2
|
uses: https://git.phyllo.me/devops/action-gh-release@v2
|
||||||
|
|||||||
Reference in New Issue
Block a user