-
Notifications
You must be signed in to change notification settings - Fork 28
61 lines (50 loc) · 2.1 KB
/
build.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Build Guix Installer
on:
push:
branches:
- master
schedule:
# build every week
- cron: "0 0 */7 * *"
# 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
- name: Install Guix
uses: PromyLOPh/[email protected]
- name: Set up Nonguix Substitutes
run: |
# This is necessary to authorize the substitute server
wget https://substitutes.nonguix.org/signing-key.pub
mv signing-key.pub nonguix-signing-key.pub
sudo guix archive --authorize < nonguix-signing-key.pub
- name: Build ISO
run: |
SUBSTITUTE_URLS="--substitute-urls='https://ci.guix.gnu.org https://bordeaux.guix.gnu.org https://substitutes.nonguix.org'"
# Write out the channels file so it can be included
guix time-machine -C './guix/base-channels.scm' -- describe -f channels > './guix/channels.scm'
# Build the image
image=$(guix time-machine -C './guix/channels.scm' $SUBSTITUTE_URLS -- system image -t iso9660 $SUBSTITUTE_URLS './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: |
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
echo $'\r\n```' >> release-notes.md
- name: Create Release
uses: softprops/action-gh-release@v1
with:
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