Simple container image just for create RPM and APT repo
  • Shell 97.8%
  • Dockerfile 2.2%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
xlion-bot-renovate[bot] 0d2aaf0df4
chore(deps): update quay.io/fedora/fedora:45 docker digest to e203b41 (#618)
Co-authored-by: xlion-bot-renovate[bot] <218815870+xlion-bot-renovate[bot]@users.noreply.github.com>
2026-11-16 08:03:43 +00:00
.github chore(deps): update docker/login-action action to v4.8.0 (#612) 2026-11-10 22:03:45 +00:00
docs Set rpm's default backend to sq; sign rpm to both v4 and v6 format; import key to sq; (#525) 2026-10-28 10:32:32 +08:00
scripts Set rpm's default backend to sq; sign rpm to both v4 and v6 format; import key to sq; (#525) 2026-10-28 10:32:32 +08:00
tests Set rpm's default backend to sq; sign rpm to both v4 and v6 format; import key to sq; (#525) 2026-10-28 10:32:32 +08:00
AGENTS.md Set rpm's default backend to sq; sign rpm to both v4 and v6 format; import key to sq; (#525) 2026-10-28 10:32:32 +08:00
aptly.sh Bump aptly to 1.6.3 2026-07-06 16:24:29 +08:00
Dockerfile chore(deps): update quay.io/fedora/fedora:45 docker digest to e203b41 (#618) 2026-11-16 08:03:43 +00:00
LICENSE Add LICENSE 2026-03-10 00:00:09 +08:00
README.md fix(renovate): align README checkout automerge 2026-07-27 01:14:41 +08:00

fedora-createrepo-image

Build all

Build a Fedora based container image just for creating and building RPM and also APT repo.

By creating and using this container images, it can save time, resources and energy, because it won't need to update package lists and install dependencies every time when it runs.

I mainly use it on all of my RustDesk repos. (Check my profile)

Frequency

Build once a week. When new base images available.

Installed packages

This container includes the following packages:

  • RPM/APT repo tools: createrepo_c, reprepro, aptly
  • Package building: rpm-build, devscripts, ruby, rubygem-json
  • Utilities: jq, wget2, tree, gnupg, git, gh, rpm-sign
  • Package repackaging: fpm

For more details, please refer to the Dockerfile.

Tagging

The latest will be latest, and a date (yyyymmdd) tag if you want specific environment or for testing.

Architectures

Just use the latest tag, it will choose the right architecture automatically.

  • amd64
  • arm64

Use this container in actions

Just add container: ghcr.io/xlionjuan/fedora-createrepo-image:latest after runs-on: ubuntu-24.04-arm, if your workflows doesn't need x86 runners, I recommend using ARM runners because it is using lower footprints.

jobs:
    build:
      runs-on: ubuntu-24.04-arm # Or ubuntu-latest if you really need x86 runners
      container: ghcr.io/xlionjuan/fedora-createrepo-image:latest
      steps:
        - name: Checkout code
          uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
      .....
      .....

Verify the container

The container will be signed with cosign and GitHub Attestations, you can verify the container before you using it in the workflow.

The build also publishes an SPDX JSON SBOM for each architecture image and attaches the same SBOM as both a GitHub SBOM attestation and a cosign SBOM attestation to the pushed image digest. The SBOM is generated from the built container image, so it reflects the RPM packages, Ruby gems, and scripts that are actually present in the image.

For workflows that verify the container before using it, resolve the latest tag to a digest first, verify that immutable digest, and use the same digest in later jobs. This avoids a time-of-check/time-of-use race where latest changes after verification but before the container job starts.

This is an example workflow for verifying the container before using the container.

jobs:
    verify:
      name: Verify container
      runs-on: ubuntu-24.04-arm
      outputs:
        digest: ${{ steps.get-digest.outputs.digest }}
      steps:
        # If you want to use cosign to verify the container, you should install cosign first.

        # You only need to choose one method

        - name: Install Cosign
          uses: sigstore/[email protected]

        # Resolve the floating tag once, then verify and use this exact digest.
        - name: Get image digest
          id: get-digest
          run: |
            set -euo pipefail
            digest="$(skopeo inspect --format '{{.Digest}}' docker://ghcr.io/xlionjuan/fedora-createrepo-image:latest)"
            test -n "$digest"
            echo "Resolved digest: ${digest}"
            echo "digest=${digest}" >> "$GITHUB_OUTPUT"

        - name: Verify with cosign
          run: |
            cosign verify --rekor-url=https://rekor.sigstore.dev \
            --certificate-identity-regexp "https://github.com/xlionjuan/.*" \
            --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
            ghcr.io/xlionjuan/fedora-createrepo-image@${{ steps.get-digest.outputs.digest }}

        # Optional: verify the SBOM attestation with cosign.
        # SBOMs are attached to architecture-specific image digests, not the
        # multi-architecture `latest` manifest. Use the tag matching the
        # runner architecture, such as `latest-amd64` or `latest-arm64`.
        - name: Verify SBOM attestation with cosign (optional)
          run: |
            cosign verify-attestation \
            --type https://spdx.dev/Document/v2.3 \
            --certificate-identity-regexp "https://github.com/xlionjuan/.*" \
            --certificate-oidc-issuer "https://token.actions.githubusercontent.com" \
            ghcr.io/xlionjuan/fedora-createrepo-image:latest-arm64

        # Unfortunately, gh can't do anything without login, even just `gh attestation verify` command
        # so it needs to login, but NO any permissions are required.

        - name: Verify with gh
          env:
            GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          run: gh attestation verify --owner xlionjuan oci://ghcr.io/xlionjuan/fedora-createrepo-image@${{ steps.get-digest.outputs.digest }}

        # Optional: verify the SBOM attestation with GitHub CLI.
        # Like the cosign SBOM check above, this must target an
        # architecture-specific image tag or digest.
        - name: Verify SBOM attestation with gh (optional)
          env:
            GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          run: |
            gh attestation verify \
              --owner xlionjuan \
              --predicate-type https://spdx.dev/Document/v2.3 \
              oci://ghcr.io/xlionjuan/fedora-createrepo-image:latest-arm64

    build:
      runs-on: ubuntu-24.04-arm
      needs: verify # So this will only runs if "verify" is passed.
      container: ghcr.io/xlionjuan/fedora-createrepo-image@${{ needs.verify.outputs.digest }}
      steps:
        - name: Checkout code
          uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1

        - name: Do something
          run: rpm -qa