Skip to content

Commit

Permalink
Update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
valtzu committed Apr 18, 2024
1 parent e7bd155 commit 9eb6f1e
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 15 deletions.
38 changes: 24 additions & 14 deletions .github/workflows/mkosi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,35 @@ jobs:
- run: |
pipx ensurepath
pipx install git+https://github.com/systemd/mkosi.git@v22
# - name: Generate secure boot key
# run: mkosi --debug genkey
- name: Build (cached) tools
run: mkosi --preset=tools
- name: Show image summary
run: mkosi summary
- name: Setup mkosi
run: |
touch mkosi.key mkosi.crt
chmod 0600 mkosi.key mkosi.crt
cat << EOF > mkosi.key
${{ secrets.MKOSI_KEY }}
EOF
cat << EOF > mkosi.crt
${{ secrets.MKOSI_CRT }}
EOF
echo -n ${{ github.ref_name }} > mkosi.version
echo "OUTPUT_DIR=$(mkosi --json summary|jq -r '.Images[0]|.OutputDirectory')" >> $GITHUB_ENV
echo "OUTPUT=$(mkosi --json summary|jq -r '.Images[0]|.Output')" >> $GITHUB_ENV
- name: Build images
run: mkosi --image-version=${{ github.ref_name }}
- name: Rename SHA256SUMS
run: mv mkosi.output/system_${{ github.ref_name }}.SHA256SUMS mkosi.output/SHA256SUMS
run: mkosi build
- name: Patch UKI name
run: ./patch-uki-name.sh ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT }}.raw
- name: Compress outputs
run: xz -0 ${{ env.OUTPUT_DIR }}/${{ env.OUTPUT }}*.*
- name: Generate SHA256SUMS
working-directory: ${{ env.OUTPUT_DIR }}
run: sha256sum ${{ env.OUTPUT }}*.xz > SHA256SUMS
- name: Release
uses: softprops/action-gh-release@v1
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
fail_on_unmatched_files: true
generate_release_notes: true
files: |
mkosi.output/system_${{ github.ref_name }}.raw.xz
mkosi.output/system_${{ github.ref_name }}.usr-*.raw.xz
mkosi.output/system_${{ github.ref_name }}.efi
mkosi.output/SHA256SUMS
${{ env.OUTPUT_DIR }}/${{ env.OUTPUT }}.*
${{ env.OUTPUT_DIR }}/SHA256SUMS
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Vagrant.configure("2") do |config|
sudo apt-get update
sudo apt-get install -y --no-install-recommends python3 python3-pip python-is-python3 python3-pyelftools python3-pefile pipx \
qemu-user-static binfmt-support bubblewrap dosfstools mtools uidmap libfdisk-dev libtss2-dev libssl-dev debian-archive-keyring \
binutils-aarch64-linux-gnu
binutils-aarch64-linux-gnu jq
sudo apt-get upgrade -y
mkdir -p ~/build ~/.local/bin
Expand Down
Empty file modified patch-uki-name.sh
100644 → 100755
Empty file.

0 comments on commit 9eb6f1e

Please sign in to comment.