Fix mkimage.sh #68
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| env: | |
| version: 3.23 | |
| name: Alpine ISO Builder | |
| on: | |
| push: | |
| jobs: | |
| build_ISOs: | |
| runs-on: ubuntu-24.04 | |
| container: | |
| image: alpine:3.23 | |
| steps: | |
| - name: Install software | |
| run: | | |
| apk update | |
| apk upgrade | |
| apk --no-cache add alpine-sdk build-base apk-tools alpine-conf \ | |
| busybox fakeroot syslinux xorriso squashfs-tools sudo mtools \ | |
| dosfstools grub-efi github-cli | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Fetch missing git tags | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| run: | | |
| git config --global --add safe.directory . | |
| git fetch --tags --force | |
| - name: Download aports | |
| run: git clone --depth=1 https://gitlab.alpinelinux.org/alpine/aports.git | |
| - name: Configure build keys | |
| run: echo | abuild-keygen -i -a | |
| - name: Make ISO | |
| run: | | |
| chmod +x genapkovl-*.sh | |
| cp *.sh aports/scripts/ | |
| cd aports/scripts/ | |
| # Fix mkimage.sh (https://gitlab.alpinelinux.org/alpine/aports/-/issues/17946) | |
| sed -i 's/--no-chown//' mkimage.sh | |
| ./mkimage.sh \ | |
| --tag ${version}-$(date +%y%m%d) \ | |
| --arch x86_64 \ | |
| --profile docker \ | |
| --outdir ../../ \ | |
| --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/main \ | |
| --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/community | |
| ./mkimage.sh \ | |
| --tag ${version}-$(date +%y%m%d) \ | |
| --arch x86_64 \ | |
| --profile podman \ | |
| --outdir ../../ \ | |
| --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/main \ | |
| --repository https://dl-cdn.alpinelinux.org/alpine/v${version}/community | |
| - name: Upload ISO | |
| if: ${{ ! startsWith(github.ref, 'refs/tags/v') }} | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: alpine_${{ env.version }}_iso | |
| path: ./*.iso | |
| - name: Release AlpDock ISO | |
| if: ${{ startsWith(github.ref, 'refs/tags/v') }} | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| if git cat-file -t ${{ github.ref_name }} | grep -q '^tag$'; then | |
| git tag -n ${{ github.ref_name }} --format="### %(subject)" > changelog.txt | |
| else | |
| echo "### Main changes:" > changelog.txt | |
| git log --reverse --pretty=format:"- %h: %s" $(git describe --tags --abbrev=0 HEAD^)..HEAD | egrep -v 'fix:|minor:|typo:' >> changelog.txt | |
| commits="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/compare/$(git tag --sort=-v:refname | sed -n 2p)...$(git tag --sort=-v:refname | sed -n 1p)" | |
| echo -e "<br>\n\n**Full Changelog**: $commits" >> changelog.txt | |
| fi | |
| sha256sum *.iso > sha256sums.txt | |
| gh release create ${{ github.ref_name }} \ | |
| --title ${{ github.ref_name }} \ | |
| --verify-tag \ | |
| --latest \ | |
| --notes-file changelog.txt \ | |
| *.iso sha256sums.txt |