Skip to content

Commit

Permalink
fix: use gdisk for setting partition attribute flags
Browse files Browse the repository at this point in the history
  • Loading branch information
lleyton committed May 22, 2024
1 parent 60aca35 commit 172d3f3
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 41 deletions.
74 changes: 35 additions & 39 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ env:
dosfstools
grub2
parted
gdisk
util-linux-core
systemd-container
grub2-efi
Expand All @@ -38,50 +39,45 @@ env:
isomd5sum
jobs:
build:
strategy:
matrix:
arch: [x86_64, aarch64]
build:
strategy:
matrix:
arch: [x86_64, aarch64]

# run job on ubuntu-latest unless aarch64 then arm64
runs-on: ${{ matrix.arch == 'aarch64' && 'arm64' || 'ubuntu-latest' }}
# run job on ubuntu-latest unless aarch64 then arm64
runs-on: ${{ matrix.arch == 'aarch64' && 'arm64' || 'ubuntu-latest' }}

container:
image: ghcr.io/terrapkg/builder:f38
container:
image: ghcr.io/terrapkg/builder:f38

steps:
- uses: actions/checkout@v4
steps:
- uses: actions/checkout@v4

- name: Install dependencies
run: |
dnf install -y $DNF_PKGS
- name: Install dependencies
run: |
dnf install -y $DNF_PKGS
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Build
run:
cargo build --release

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.arch }}
path: target/release/terra


- name: Add binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/katsu
asset_name: katsu-${{ matrix.arch }}
tag: ${{ github.ref }}
# release_name: ${{ github.ref }}
overwrite: true
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true

- name: Build
run: cargo build --release

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.arch }}
path: target/release/terra

- name: Add binary to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/katsu
asset_name: katsu-${{ matrix.arch }}
tag: ${{ github.ref }}
# release_name: ${{ github.ref }}
overwrite: true
4 changes: 2 additions & 2 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -463,8 +463,8 @@ impl PartitionLayout {

for flag in flags {
let position = flag.flag_position();
trace!("parted -s {disk:?} toggle {i} {position}");
cmd_lib::run_cmd!(parted -s $disk toggle $i $position 2>&1)?;
trace!("sgdisk -A {i}:set:{position} {disk:?}");
cmd_lib::run_cmd!(sgdisk -A $i:set:$position $disk 2>&1)?;
}
}

Expand Down

0 comments on commit 172d3f3

Please sign in to comment.