guix-installer/.github/workflows/build.yaml

54 lines
1.6 KiB
YAML
Raw Normal View History

2021-05-26 13:12:36 +00:00
name: Build Guix Installer
on:
2021-05-26 13:15:20 +00:00
push:
branches:
- master
2021-05-26 13:12:36 +00:00
schedule:
# build every week
- cron: "0 0 */7 * *"
2021-05-26 13:12:36 +00:00
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Git checkout
uses: actions/checkout@v4
2021-05-26 13:12:36 +00:00
- name: Install Guix
uses: PromyLOPh/guix-install-action@v1.5
2021-05-26 13:12:36 +00:00
- name: Build ISO
run: |
# Write out the channels file so it can be included
2021-06-22 15:18:19 +00:00
guix time-machine -C './guix/base-channels.scm' -- describe -f channels > './guix/channels.scm'
# Build the image
2021-06-22 15:18:19 +00:00
image=$(guix time-machine -C './guix/channels.scm' -- system image -t iso9660 './guix/installer.scm')
# Copy the image to the local folder with a better name
export RELEASE_TAG=$(date +"%Y%m%d%H%M")
echo "RELEASE_TAG=$RELEASE_TAG" >> $GITHUB_ENV
cp $image ./guix-installer-$RELEASE_TAG.iso
- name: Prepare Release Notes
run: |
2021-05-30 21:35:32 +00:00
echo $'This installer image was prepared with the following channel configuration:\r\n\r\n```\r\n' > release-notes.md
cat ./guix/channels.scm >> release-notes.md
2021-05-30 21:35:32 +00:00
echo $'\r\n```' >> release-notes.md
- name: Create Release
uses: softprops/action-gh-release@v1
with:
2021-05-30 21:35:32 +00:00
name: Guix Installer - ${{ env.RELEASE_TAG }}
tag_name: v${{ env.RELEASE_TAG }}
body_path: release-notes.md
files: guix-installer-${{ env.RELEASE_TAG }}.iso
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: SystemCrafters/guix-installer