From 9a7889a3bf2d616295147164f51c9477b03aa1e4 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 9 May 2024 02:00:07 +0900 Subject: [PATCH 1/4] Update container image --- images/ubuntu-nix-sudoer/Containerfile | 8 ++++---- images/ubuntu-nix-systemd/Containerfile | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/images/ubuntu-nix-sudoer/Containerfile b/images/ubuntu-nix-sudoer/Containerfile index 56c9936..8edf994 100644 --- a/images/ubuntu-nix-sudoer/Containerfile +++ b/images/ubuntu-nix-sudoer/Containerfile @@ -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/* diff --git a/images/ubuntu-nix-systemd/Containerfile b/images/ubuntu-nix-systemd/Containerfile index c7e7148..0cb6ad5 100644 --- a/images/ubuntu-nix-systemd/Containerfile +++ b/images/ubuntu-nix-systemd/Containerfile @@ -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/* From dba9c86eb28e1e292777609b83f5ddaed31333cb Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 9 May 2024 02:21:44 +0900 Subject: [PATCH 2/4] Update Linux runner https://github.com/actions/runner-images/blob/7781af869bec02d4d491cba6d01de412e96d865d/README.md?plain=1#L24 --- .github/workflows/cleanup-staging-packages.yml | 2 +- .github/workflows/containers.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cleanup-staging-packages.yml b/.github/workflows/cleanup-staging-packages.yml index 97bcd6a..2022722 100644 --- a/.github/workflows/cleanup-staging-packages.yml +++ b/.github/workflows/cleanup-staging-packages.yml @@ -17,7 +17,7 @@ defaults: jobs: ghcr: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 if: (github.event_name != 'pull_request') || (github.event.pull_request.merged == true) timeout-minutes: 15 steps: diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 86df665..f1f9ea0 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -18,7 +18,7 @@ on: jobs: # podman can handle lowercase. So normalize the outputs get-meta: - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 5 outputs: started_at: ${{ steps.timestamp.outputs.started_at }} @@ -54,7 +54,7 @@ jobs: echo "ref=${ref}" | tee -a "$GITHUB_OUTPUT" ubuntu-nix-sudoer: needs: [get-meta] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 30 outputs: package-json: ${{ steps.inspect-package.outputs.json }} @@ -106,7 +106,7 @@ jobs: jq | gh-action-escape -name=json | tee -a "$GITHUB_OUTPUT" ubuntu-nix-systemd: needs: [get-meta] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 30 outputs: package-json: ${{ steps.inspect-package.outputs.json }} @@ -157,7 +157,7 @@ jobs: announce-staging: needs: [get-meta, ubuntu-nix-systemd, ubuntu-nix-sudoer] - runs-on: ubuntu-22.04 + runs-on: ubuntu-24.04 timeout-minutes: 10 steps: - name: Prepare git to run gh commands From 57d5204b8904b24cfe1c6e499a92499c76c72569 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 9 May 2024 02:25:49 +0900 Subject: [PATCH 3/4] Revert "Update Linux runner" This reverts commit dba9c86eb28e1e292777609b83f5ddaed31333cb. https://github.com/actions/runner-images/issues/9691#issuecomment-2099267078 --- .github/workflows/cleanup-staging-packages.yml | 2 +- .github/workflows/containers.yml | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/cleanup-staging-packages.yml b/.github/workflows/cleanup-staging-packages.yml index 2022722..97bcd6a 100644 --- a/.github/workflows/cleanup-staging-packages.yml +++ b/.github/workflows/cleanup-staging-packages.yml @@ -17,7 +17,7 @@ defaults: jobs: ghcr: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 if: (github.event_name != 'pull_request') || (github.event.pull_request.merged == true) timeout-minutes: 15 steps: diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index f1f9ea0..86df665 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -18,7 +18,7 @@ on: jobs: # podman can handle lowercase. So normalize the outputs get-meta: - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 timeout-minutes: 5 outputs: started_at: ${{ steps.timestamp.outputs.started_at }} @@ -54,7 +54,7 @@ jobs: echo "ref=${ref}" | tee -a "$GITHUB_OUTPUT" ubuntu-nix-sudoer: needs: [get-meta] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 timeout-minutes: 30 outputs: package-json: ${{ steps.inspect-package.outputs.json }} @@ -106,7 +106,7 @@ jobs: jq | gh-action-escape -name=json | tee -a "$GITHUB_OUTPUT" ubuntu-nix-systemd: needs: [get-meta] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 timeout-minutes: 30 outputs: package-json: ${{ steps.inspect-package.outputs.json }} @@ -157,7 +157,7 @@ jobs: announce-staging: needs: [get-meta, ubuntu-nix-systemd, ubuntu-nix-sudoer] - runs-on: ubuntu-24.04 + runs-on: ubuntu-22.04 timeout-minutes: 10 steps: - name: Prepare git to run gh commands From 4759bee1084d84a977fcf9622850db8d61f65c27 Mon Sep 17 00:00:00 2001 From: Kenichi Kamiya Date: Thu, 9 May 2024 02:34:23 +0900 Subject: [PATCH 4/4] Add Ubuntu version number in ghcr package name --- .github/workflows/containers.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/containers.yml b/.github/workflows/containers.yml index 86df665..8d6927d 100644 --- a/.github/workflows/containers.yml +++ b/.github/workflows/containers.yml @@ -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 @@ -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: @@ -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 @@ -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" @@ -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