mirror of
https://github.com/morgan9e/fedora-dev
synced 2026-04-14 00:14:18 +09:00
Init
This commit is contained in:
48
.github/workflows/docker-publish.yml
vendored
Normal file
48
.github/workflows/docker-publish.yml
vendored
Normal file
@@ -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
|
||||
27
Dockerfile
Normal file
27
Dockerfile
Normal file
@@ -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"]
|
||||
Reference in New Issue
Block a user