commit b7a5da840ff6fea859f5f5a6c0ea8a8d20e96261 Author: Morgan Date: Tue Dec 9 08:21:21 2025 +0900 Init diff --git a/.github/workflows/docker-publish.yml b/.github/workflows/docker-publish.yml new file mode 100644 index 0000000..e9fd09b --- /dev/null +++ b/.github/workflows/docker-publish.yml @@ -0,0 +1,48 @@ +on: + push: + branches: [ "main" ] + +env: + REGISTRY: ghcr.io + IMAGE_NAME: ${{ github.repository }} + +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + packages: write + id-token: write + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3.0.0 + + - name: Log into registry ${{ env.REGISTRY }} + uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0 + with: + registry: ${{ env.REGISTRY }} + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Extract Docker metadata + id: meta + uses: docker/metadata-action@96383f45573cb7f253c731d3b3ab81c87ef81934 + with: + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} + tags: | + type=raw,value=latest + + - name: Build and push Docker image + id: build-and-push + uses: docker/build-push-action@0565240e2d4ab88bba5387d719585280857ece09 # v5.0.0 + with: + context: . + push: true + tags: ${{ steps.meta.outputs.tags }} + labels: ${{ steps.meta.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..883de3c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,27 @@ +FROM registry.fedoraproject.org/fedora-toolbox:43 + +RUN dnf install -y \ + https://download1.rpmfusion.org/free/fedora/rpmfusion-free-release-"$(rpm -E %fedora)".noarch.rpm \ + https://download1.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-"$(rpm -E %fedora)".noarch.rpm \ + && dnf clean all + +RUN dnf update -y && dnf clean all + +RUN dnf install -y \ + fedpkg fedora-packager rpmdevtools ncurses-devel pesign git \ + bpftool bc bison dwarves elfutils-devel flex gcc gcc-c++ gcc-plugin-devel \ + glibc-static hostname m4 make net-tools openssl openssl-devel perl-devel \ + perl-generators python3-devel which kernel-rpm-macros vim \ + cmake ninja-build meson autoconf automake libtool pkgconfig ccache sccache \ + curl wget httpie \ + tar gzip bzip2 xz zstd zip unzip \ + python3 python3-pip python3-virtualenv pipx \ + rust cargo golang \ + && dnf clean all + +RUN rpmdev-setuptree + +RUN mkdir -p /data +WORKDIR /data + +CMD ["/bin/bash"] \ No newline at end of file