feat: new ubuntu 24.04 image
This commit is contained in:
commit
6fbb8bd631
4 changed files with 83 additions and 0 deletions
62
.forgejo/workflows/build.yml
Normal file
62
.forgejo/workflows/build.yml
Normal file
|
@ -0,0 +1,62 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: '30 4 * * 6'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build
|
||||
runs-on: docker
|
||||
container: debian:12
|
||||
permissions:
|
||||
packages: write
|
||||
strategy:
|
||||
matrix:
|
||||
images:
|
||||
- name: ubuntu
|
||||
tag: 24.04
|
||||
steps:
|
||||
- name: Install NodeJS
|
||||
shell: sh
|
||||
run: |
|
||||
apt-get update && apt-get install -y curl
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && bash nodesource_setup.sh
|
||||
apt-get install -y nodejs
|
||||
node -v
|
||||
# https://docs.docker.com/engine/install/debian/#install-using-the-repository
|
||||
- name: Install Docker
|
||||
shell: sh
|
||||
run: |
|
||||
apt-get install ca-certificates curl
|
||||
install -m 0755 -d /etc/apt/keyrings
|
||||
curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
|
||||
chmod a+r /etc/apt/keyrings/docker.asc
|
||||
echo \
|
||||
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
|
||||
$(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
|
||||
tee /etc/apt/sources.list.d/docker.list > /dev/null
|
||||
apt-get update && apt-get install -y docker-ce-cli docker-buildx-plugin
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
- name: Extract Registry Hostname
|
||||
shell: bash
|
||||
run: |
|
||||
SERVER_URL="${{ github.server_url }}"
|
||||
HOSTNAME="${SERVER_URL#https://}"
|
||||
echo "Hostname: HOSTNAME"
|
||||
echo "DOCKER_REGISTRY_HOST=$HOSTNAME" >> "$GITHUB_ENV"
|
||||
- name: Login to Forgejo Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ github.server_url }}
|
||||
username: ${{ vars.CONTAINER_USER }}
|
||||
password: ${{ secrets.CONTAINER_PASSWORD }}
|
||||
- name: Build and push
|
||||
uses: docker/build-push-action@v6
|
||||
with:
|
||||
context: ./images/${{ matrix.images.name }}/${{ matrix.images.tag }}
|
||||
push: true
|
||||
tags: ${{ env.DOCKER_REGISTRY_HOST }}/${{ github.repository_owner }}/${{ matrix.images.name }}:${{ matrix.images.tag }}
|
||||
no-cache: true
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
.idea
|
9
README.md
Normal file
9
README.md
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Images
|
||||
|
||||
## Ubuntu 24.04
|
||||
|
||||
https://git.martin-riedl.de/ci/-/packages/container/ubuntu/24.04
|
||||
|
||||
### Pre-Installed Software
|
||||
|
||||
- nodejs 22
|
11
images/ubuntu/24.04/Dockerfile
Normal file
11
images/ubuntu/24.04/Dockerfile
Normal file
|
@ -0,0 +1,11 @@
|
|||
FROM ubuntu:24.04
|
||||
|
||||
RUN apt-get update && apt-get upgrade -y && rm -rf /var/lib/apt/lists/*
|
||||
|
||||
# install nodejs
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends curl && \
|
||||
curl -fsSL https://deb.nodesource.com/setup_22.x -o nodesource_setup.sh && \
|
||||
bash nodesource_setup.sh && \
|
||||
apt-get install -y --no-install-recommends nodejs && \
|
||||
rm -rf /var/lib/apt/lists/* && \
|
||||
node -v
|
Loading…
Add table
Reference in a new issue