Skip to content

Commit

Permalink
Update base image to Ubuntu 24.04 LTS (#71)
Browse files Browse the repository at this point in the history
* Update container image

* Update Linux runner

https://github.com/actions/runner-images/blob/7781af869bec02d4d491cba6d01de412e96d865d/README.md?plain=1#L24

* Revert "Update Linux runner"

This reverts commit dba9c86.

actions/runner-images#9691 (comment)

* Add Ubuntu version number in ghcr package name
  • Loading branch information
kachick authored May 8, 2024
1 parent 6d1c2ad commit a05d19e
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
12 changes: 6 additions & 6 deletions .github/workflows/containers.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ jobs:
id: build-image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 #v2.13
with:
image: ubuntu-nix-sudoer
image: ubuntu-24.04-nix-sudoer
tags: ${{ needs.get-meta.outputs.special_tag }} ${{ needs.get-meta.outputs.ref_tag }} ${{ needs.get-meta.outputs.timestamp_tag }}
containerfiles: |
./images/ubuntu-nix-sudoer/Containerfile
Expand Down Expand Up @@ -101,7 +101,7 @@ jobs:
gh api --paginate \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/users/${{ github.repository_owner }}/packages/container/ubuntu-nix-sudoer/versions \
/users/${{ github.repository_owner }}/packages/container/ubuntu-24.04-nix-sudoer/versions \
--jq '.[] | select(.name == "${{ steps.push-to-ghcr.outputs.digest }}")' | \
jq | gh-action-escape -name=json | tee -a "$GITHUB_OUTPUT"
ubuntu-nix-systemd:
Expand All @@ -118,7 +118,7 @@ jobs:
id: build-image
uses: redhat-actions/buildah-build@7a95fa7ee0f02d552a32753e7414641a04307056 #v2.13
with:
image: ubuntu-nix-systemd
image: ubuntu-24.04-nix-systemd
tags: ${{ needs.get-meta.outputs.special_tag }} ${{ needs.get-meta.outputs.ref_tag }} ${{ needs.get-meta.outputs.timestamp_tag }}
containerfiles: |
./images/ubuntu-nix-systemd/Containerfile
Expand Down Expand Up @@ -151,7 +151,7 @@ jobs:
gh api --paginate \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/users/${{ github.repository_owner }}/packages/container/ubuntu-nix-systemd/versions \
/users/${{ github.repository_owner }}/packages/container/ubuntu-24.04-nix-systemd/versions \
--jq '.[] | select(.name == "${{ steps.push-to-ghcr.outputs.digest }}")' | \
jq | gh-action-escape -name=json | tee -a "$GITHUB_OUTPUT"
Expand All @@ -172,8 +172,8 @@ jobs:
⬢🦭 Staging container-image has been deployed 🚀\
You can check in package URL
* systemd: https://github.com/${{ github.repository }}/pkgs/container/ubuntu-nix-systemd/${{ fromJson(needs.ubuntu-nix-systemd.outputs.package-json).id }}?tag=${{ needs.get-meta.outputs.special_tag }}
* sudoer: https://github.com/${{ github.repository }}/pkgs/container/ubuntu-nix-sudoer/${{ fromJson(needs.ubuntu-nix-sudoer.outputs.package-json).id }}?tag=${{ needs.get-meta.outputs.special_tag }}
* systemd: https://github.com/${{ github.repository }}/pkgs/container/ubuntu-24.04-nix-systemd/${{ fromJson(needs.ubuntu-nix-systemd.outputs.package-json).id }}?tag=${{ needs.get-meta.outputs.special_tag }}
* sudoer: https://github.com/${{ github.repository }}/pkgs/container/ubuntu-24.04-nix-sudoer/${{ fromJson(needs.ubuntu-nix-sudoer.outputs.package-json).id }}?tag=${{ needs.get-meta.outputs.special_tag }}
This image will be automatically 🤖 removed from ghcr.io 🗑️ if you merged/closed this PR 😌
EOF
Expand Down
8 changes: 4 additions & 4 deletions images/ubuntu-nix-sudoer/Containerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

LABEL org.opencontainers.image.source=https://github.com/kachick/containers
LABEL org.opencontainers.image.description="Nix package manager on Ubuntu - sudoer"
LABEL org.opencontainers.image.licenses=MIT

# Available versions in apt: https://packages.ubuntu.com/jammy/curl
# Available versions in apt: https://packages.ubuntu.com/noble/curl
# --no-install-recommends omits ca-certificates
# sudo is required in non systemd with Nix
RUN apt-get update \
&& apt-get install --no-install-recommends -y curl=7.81.0-1ubuntu1.15 ca-certificates=20230311ubuntu0.22.04.1 \
sudo=1.9.9-1ubuntu2.4 \
&& apt-get install --no-install-recommends -y curl=8.5.0-2ubuntu10.1 ca-certificates=20240203 \
sudo=1.9.15p5-3ubuntu5 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down
8 changes: 4 additions & 4 deletions images/ubuntu-nix-systemd/Containerfile
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
FROM ubuntu:22.04
FROM ubuntu:24.04

LABEL org.opencontainers.image.source=https://github.com/kachick/containers
LABEL org.opencontainers.image.description="Nix package manager on Ubuntu - systemd"
LABEL org.opencontainers.image.licenses=MIT

# Available versions in apt: https://packages.ubuntu.com/jammy/curl
# Available versions in apt: https://packages.ubuntu.com/noble/curl
# --no-install-recommends omits ca-certificates
RUN apt-get update \
&& apt-get install --no-install-recommends -y curl=7.81.0-1ubuntu1.15 ca-certificates=20230311ubuntu0.22.04.1 \
systemd=249.11-0ubuntu3.12 \
&& apt-get install --no-install-recommends -y curl=8.5.0-2ubuntu10.1 ca-certificates=20240203 \
systemd=255.4-1ubuntu8 \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

Expand Down

0 comments on commit a05d19e

Please sign in to comment.