summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Pignolet <matthieu@puffer.fish>2025-10-30 07:07:38 +0100
committerMatthieu Pignolet <matthieu@puffer.fish>2025-10-30 07:07:38 +0100
commit8348f35121c9c1cd724e014c308c0dc41c5d73d6 (patch)
treeb952b05de6e846dfa97a36703216256e503dcbdf
parent2d8aa37bc7c70ce5f652e88ba1e6e454e879cec7 (diff)
feat: build a container with buildah and git for ci
-rw-r--r--.forgejo/workflows/demo.yaml15
-rw-r--r--ci/Containerfile4
2 files changed, 7 insertions, 12 deletions
diff --git a/.forgejo/workflows/demo.yaml b/.forgejo/workflows/demo.yaml
index 4a9912b..c48eb23 100644
--- a/.forgejo/workflows/demo.yaml
+++ b/.forgejo/workflows/demo.yaml
@@ -7,26 +7,17 @@ on:
jobs:
test:
- runs-on: docker
+ runs-on: podman
steps:
- run: echo All good!
container-build:
name: Build image
- runs-on: docker
+ runs-on: podman
+ image: 'ci/Containerfile'
steps:
- uses: actions/checkout@v4
- - name: install buildah
- run: |
- . /etc/lsb-release && \
- sudo apt-get update && \
- sudo apt-get install -y gnupg2 && \
- echo "deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/xUbuntu_${DISTRIB_RELEASE}/ /" | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list && \
- curl -fsL "https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/xUbuntu_${DISTRIB_RELEASE}/Release.key" | sudo apt-key add - && \
- sudo apt-get update && \
- sudo apt-get install -y buildah fuse-overlayfs
- sudo sed -i 's/^\[machine\]$/#\[machine\]/' /usr/share/containers/containers.conf
- name: Buildah Action
uses: redhat-actions/buildah-build@v2
with:
diff --git a/ci/Containerfile b/ci/Containerfile
new file mode 100644
index 0000000..5f88108
--- /dev/null
+++ b/ci/Containerfile
@@ -0,0 +1,4 @@
+FROM data.forgejo.org/oci/node:20-bullseye
+
+RUN apt-get update && \
+ apt-get install -y buildah git \ No newline at end of file