Compare commits
11 Commits
d09abac1d3
...
a90118aebe
Author | SHA1 | Date |
---|---|---|
Collin J. Doering | a90118aebe | |
Collin J. Doering | ae21f99ddb | |
Collin J. Doering | 73cc450f6f | |
Collin J. Doering | a82b4c2efa | |
Collin J. Doering | 692577c025 | |
Collin J. Doering | c32f86bc79 | |
Collin J. Doering | a53e0fd61b | |
Collin J. Doering | 86f051167b | |
Collin J. Doering | f2786e17ae | |
Collin J. Doering | 6c8faca7a4 | |
Collin J. Doering | ba31548ad5 |
|
@ -1,21 +1,14 @@
|
||||||
name: Gitea Actions Demo
|
name: Guix Builder
|
||||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
|
run-name: ${{ gitea.actor }} - ${{ gitea.event.head_commit.message }}
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
Explore-Gitea-Actions:
|
Build:
|
||||||
runs-on: guix
|
runs-on: guix
|
||||||
steps:
|
steps:
|
||||||
- run: echo "🎉 The job was automatically triggered by a ${{ gitea.event_name }} event."
|
|
||||||
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by Gitea!"
|
|
||||||
- run: echo "🔎 The name of your branch is ${{ gitea.ref }} and your repository is ${{ gitea.repository }}."
|
|
||||||
- name: Guix version
|
|
||||||
run: guix --version
|
|
||||||
- name: Check out repository code
|
- name: Check out repository code
|
||||||
uses: https://github.com/actions/checkout@v3
|
uses: https://github.com/actions/checkout@v3
|
||||||
- run: echo "💡 The ${{ gitea.repository }} repository has been cloned to the runner."
|
- name: Build preparation
|
||||||
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
|
run: guix time-machine -C channels.scm -- shell -m manifest-dev.scm -- make pre-build
|
||||||
- name: List files in the repository
|
# - name: Build docker image
|
||||||
run: |
|
# run: guix time-machine -C channels.scm -- shell -m manifest-dev.scm -- make
|
||||||
ls ${{ gitea.workspace }}
|
|
||||||
- run: echo "🍏 This job's status is ${{ job.status }}."
|
|
||||||
|
|
|
@ -1,2 +1,3 @@
|
||||||
*~
|
*~
|
||||||
*.tar.gz
|
*.tar.gz
|
||||||
|
passwd
|
||||||
|
|
|
@ -1,6 +1,12 @@
|
||||||
FROM scratch as builder
|
FROM scratch
|
||||||
ADD guix-tarball-pack.tar.gz /guix-builder
|
ADD guix-tarball-pack.tar.gz /guix-builder
|
||||||
ADD links.tar.gz /
|
ADD links.tar.gz /
|
||||||
|
ADD passwd /etc/passwd
|
||||||
|
ADD passwd /tmp/proot/delete-me
|
||||||
|
|
||||||
|
ENV GUIX_LOCPATH=/guix-builder/lib/locale
|
||||||
|
ENV PROOT_TMP_DIR=/tmp/proot
|
||||||
|
RUN rm /tmp/proot/delete-me
|
||||||
|
|
||||||
VOLUME /var/guix/daemon-socket/socket /gnu/store /etc/ssl
|
VOLUME /var/guix/daemon-socket/socket /gnu/store /etc/ssl
|
||||||
ENTRYPOINT ["/guix-builder/bin/bash"]
|
ENTRYPOINT ["/guix-builder/bin/bash"]
|
||||||
|
|
19
Makefile
19
Makefile
|
@ -5,19 +5,30 @@ GUIX_MANIFEST_DEV := manifest-dev.scm
|
||||||
|
|
||||||
TARBALL ?= guix-tarball-pack.tar.gz
|
TARBALL ?= guix-tarball-pack.tar.gz
|
||||||
LINKS_TARBALL ?= links.tar.gz
|
LINKS_TARBALL ?= links.tar.gz
|
||||||
|
PASSWD_FILE ?= passwd
|
||||||
IMAGE_TAG ?= guix-builder
|
IMAGE_TAG ?= guix-builder
|
||||||
|
|
||||||
|
$(PASSWD_FILE):
|
||||||
|
echo 'root:x:0:0:root:/root:/bin/sh' > passwd
|
||||||
|
|
||||||
$(LINKS_TARBALL):
|
$(LINKS_TARBALL):
|
||||||
ln -s /guix-builder/bin bin
|
ln -s /guix-builder/bin bin
|
||||||
tar -czvf links.tar.gz bin
|
tar -czvf $@ bin
|
||||||
rm bin
|
rm bin
|
||||||
|
|
||||||
$(TARBALL):
|
$(TARBALL):
|
||||||
@cp $$(guix pack -R -S /bin=bin -S /etc/ssl=etc/ssl -m $(GUIX_MANIFEST)) $@
|
@cp $$(guix pack -RR -S /bin=bin -S /etc/ssl=etc/ssl -S /lib/locale=lib/locale -m $(GUIX_MANIFEST)) $@
|
||||||
@chmod +w $@
|
@chmod +w $@
|
||||||
|
|
||||||
|
.PHONY: size
|
||||||
|
size: $(TARBALL)
|
||||||
|
guix size $$(guix pack -RR -S /bin=bin -S /etc/ssl=etc/ssl -m $(GUIX_MANIFEST))
|
||||||
|
|
||||||
|
.PHONY: pre-build
|
||||||
|
pre-build: $(TARBALL) $(LINKS_TARBALL) $(PASSWD_FILE)
|
||||||
|
|
||||||
.PHONY: build
|
.PHONY: build
|
||||||
build: $(TARBALL) $(LINKS_TARBALL)
|
build: pre-build
|
||||||
@docker build -t $(IMAGE_TAG) .
|
@docker build -t $(IMAGE_TAG) .
|
||||||
|
|
||||||
.PHONY: run
|
.PHONY: run
|
||||||
|
@ -36,4 +47,4 @@ shell:
|
||||||
|
|
||||||
.PHONY:
|
.PHONY:
|
||||||
clean:
|
clean:
|
||||||
rm -r $(TARBALL) $(LINKS_TARBALL)
|
rm -r $(TARBALL) $(LINKS_TARBALL) $(PASSWD_FILE)
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
(url "https://git.savannah.gnu.org/git/guix.git")
|
(url "https://git.savannah.gnu.org/git/guix.git")
|
||||||
(branch "master")
|
(branch "master")
|
||||||
(commit
|
(commit
|
||||||
"1b07f397dc17e31ad55b80a4efd34fdcb5b3c690")
|
"25b83bd9e4ceb77f08c0caee3ecdc48263b53a46")
|
||||||
(introduction
|
(introduction
|
||||||
(make-channel-introduction
|
(make-channel-introduction
|
||||||
"9edb3f66fd807b096b48283debdcddccfea34bad"
|
"9edb3f66fd807b096b48283debdcddccfea34bad"
|
||||||
|
|
32
manifest.scm
32
manifest.scm
|
@ -1,10 +1,22 @@
|
||||||
(specifications->manifest
|
(define minimum-glibc-locales
|
||||||
(list "bash"
|
(make-glibc-utf8-locales
|
||||||
"coreutils"
|
glibc
|
||||||
"gawk"
|
#:locales (list "en_US" "en_CA")
|
||||||
"git"
|
#:name "glibc-english-canadian-and-us-utf8-locales"))
|
||||||
"grep"
|
|
||||||
"guix"
|
(concatenate-manifests
|
||||||
"node"
|
(list
|
||||||
"nss-certs"
|
(packages->manifest
|
||||||
"sed"))
|
(list minimum-glibc-locales))
|
||||||
|
(specifications->manifest
|
||||||
|
(list
|
||||||
|
"bash"
|
||||||
|
"coreutils"
|
||||||
|
"gawk"
|
||||||
|
"git"
|
||||||
|
"grep"
|
||||||
|
"guix"
|
||||||
|
"node"
|
||||||
|
"nss-certs"
|
||||||
|
"openssh"
|
||||||
|
"sed"))))
|
||||||
|
|
Loading…
Reference in New Issue