Compare commits
	
		
			11 Commits
		
	
	
		
			066078f23c
			...
			529abe67b1
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						529abe67b1
	
				 | 
					
					
						|||
| 
						
						
							
						
						2bef46ea1b
	
				 | 
					
					
						|||
| 
						
						
							
						
						19d1e60d2f
	
				 | 
					
					
						|||
| 
						
						
							
						
						2da770623f
	
				 | 
					
					
						|||
| 
						
						
							
						
						e90966970a
	
				 | 
					
					
						|||
| 
						
						
							
						
						a54a46b0a6
	
				 | 
					
					
						|||
| 
						
						
							
						
						a719e5f820
	
				 | 
					
					
						|||
| 
						
						
							
						
						3c4f656ec8
	
				 | 
					
					
						|||
| 
						
						
							
						
						e0e6bf2507
	
				 | 
					
					
						|||
| 
						
						
							
						
						84908c0a24
	
				 | 
					
					
						|||
| 
						
						
							
						
						762169f563
	
				 | 
					
					
						
@@ -6,7 +6,7 @@
 | 
			
		||||
        "vscode": {
 | 
			
		||||
            "extensions": [
 | 
			
		||||
                "Shopify.ruby-lsp",
 | 
			
		||||
                "ms-azuretools.vscode-docker"
 | 
			
		||||
                "docker.docker"
 | 
			
		||||
            ]
 | 
			
		||||
        }
 | 
			
		||||
    },
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										23
									
								
								.gitea/workflows/lint.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										23
									
								
								.gitea/workflows/lint.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,23 @@
 | 
			
		||||
---
 | 
			
		||||
name: Ruby Lint
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - "**"
 | 
			
		||||
  pull_request:
 | 
			
		||||
jobs:
 | 
			
		||||
  lint:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
 | 
			
		||||
 | 
			
		||||
      - name: Ruby Setup
 | 
			
		||||
        uses: ruby/setup-ruby@dffc446db9ba5a0c4446edb5bca1c5c473a806c5 # v1.235.0
 | 
			
		||||
        with:
 | 
			
		||||
          ruby-version: '3.4'
 | 
			
		||||
          bundler-cache: true
 | 
			
		||||
 | 
			
		||||
      - name: Standard Ruby
 | 
			
		||||
        run: bundle exec standardrb
 | 
			
		||||
 | 
			
		||||
@@ -1,65 +1,16 @@
 | 
			
		||||
---
 | 
			
		||||
name: Gitea Actions Demo
 | 
			
		||||
run-name: ${{ gitea.actor }} is testing out Gitea Actions 🚀
 | 
			
		||||
 | 
			
		||||
name: Release
 | 
			
		||||
on:
 | 
			
		||||
  schedule: 
 | 
			
		||||
    - cron: "0 10 * * *"
 | 
			
		||||
    - cron: "0 0 * * *"
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - "**"
 | 
			
		||||
      - main
 | 
			
		||||
    tags:
 | 
			
		||||
      - "v*.*.*"
 | 
			
		||||
  pull_request:
 | 
			
		||||
 | 
			
		||||
jobs:
 | 
			
		||||
  lint:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    permissions:
 | 
			
		||||
      checks: write
 | 
			
		||||
      contents: write
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Login to Docker
 | 
			
		||||
        uses: docker/login-action@74a5d142397b4f367a81961eba4e8cd7edddf772 # v3.4.0
 | 
			
		||||
        with:
 | 
			
		||||
          username: ${{ vars.DOCKERHUB_USERNAME }}
 | 
			
		||||
          password: ${{ secrets.DOCKERHUB_TOKEN }}
 | 
			
		||||
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
 | 
			
		||||
 | 
			
		||||
      - name: Ruby Setup
 | 
			
		||||
        uses: ruby/setup-ruby@dffc446db9ba5a0c4446edb5bca1c5c473a806c5 # v1.235.0
 | 
			
		||||
        with:
 | 
			
		||||
          ruby-version: '3.4'
 | 
			
		||||
          bundler-cache: true
 | 
			
		||||
 | 
			
		||||
      - run: bundle install
 | 
			
		||||
 | 
			
		||||
      - name: Standard Ruby
 | 
			
		||||
        run: bundle exec standardrb
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
  test:
 | 
			
		||||
    needs: lint
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
 | 
			
		||||
 | 
			
		||||
      - name: Test
 | 
			
		||||
        uses: ruby/setup-ruby@dffc446db9ba5a0c4446edb5bca1c5c473a806c5 # v1.235.0
 | 
			
		||||
        with:
 | 
			
		||||
          ruby-version: '3.4'
 | 
			
		||||
          bundler-cache: true
 | 
			
		||||
 | 
			
		||||
      - run: bundle exec rake
 | 
			
		||||
 | 
			
		||||
  docker:
 | 
			
		||||
    needs: test
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    container:
 | 
			
		||||
      image: catthehacker/ubuntu:act-latest
 | 
			
		||||
    env:
 | 
			
		||||
      DOCKER_ORG: ryanc
 | 
			
		||||
      DOCKER_LATEST: latest
 | 
			
		||||
@@ -108,7 +59,8 @@ jobs:
 | 
			
		||||
            latest=auto
 | 
			
		||||
          bake-target: docker-metadata-action
 | 
			
		||||
          tags: |
 | 
			
		||||
            type=schedule
 | 
			
		||||
            type=schedule,pattern=nightly
 | 
			
		||||
            type=edge
 | 
			
		||||
            type=ref,event=branch
 | 
			
		||||
            type=ref,event=pr
 | 
			
		||||
            type=semver,pattern={{version}}
 | 
			
		||||
@@ -127,7 +79,8 @@ jobs:
 | 
			
		||||
            latest=auto
 | 
			
		||||
            suffix=-alpine,onlatest=true
 | 
			
		||||
          tags: |
 | 
			
		||||
            type=schedule
 | 
			
		||||
            type=schedule,pattern=nightly
 | 
			
		||||
            type=edge
 | 
			
		||||
            type=ref,event=branch
 | 
			
		||||
            type=ref,event=pr
 | 
			
		||||
            type=semver,pattern={{version}}
 | 
			
		||||
							
								
								
									
										22
									
								
								.gitea/workflows/test.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										22
									
								
								.gitea/workflows/test.yaml
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,22 @@
 | 
			
		||||
---
 | 
			
		||||
name: Ruby Test
 | 
			
		||||
on:
 | 
			
		||||
  push:
 | 
			
		||||
    branches:
 | 
			
		||||
      - "**"
 | 
			
		||||
  pull_request:
 | 
			
		||||
jobs:
 | 
			
		||||
  test:
 | 
			
		||||
    runs-on: ubuntu-latest
 | 
			
		||||
    steps:
 | 
			
		||||
      - name: Checkout
 | 
			
		||||
        uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
 | 
			
		||||
 | 
			
		||||
      - name: Test
 | 
			
		||||
        uses: ruby/setup-ruby@dffc446db9ba5a0c4446edb5bca1c5c473a806c5 # v1.235.0
 | 
			
		||||
        with:
 | 
			
		||||
          ruby-version: '3.4'
 | 
			
		||||
          bundler-cache: true
 | 
			
		||||
 | 
			
		||||
      - run: bundle exec rake
 | 
			
		||||
 | 
			
		||||
@@ -1,34 +1,38 @@
 | 
			
		||||
ARG RUBY_VERSION="3.4.3"
 | 
			
		||||
FROM docker.io/library/ruby:${RUBY_VERSION}-alpine AS base
 | 
			
		||||
 | 
			
		||||
WORKDIR /kubernaut
 | 
			
		||||
 | 
			
		||||
RUN <<EOT
 | 
			
		||||
  apk update -q
 | 
			
		||||
  apk add bash jemalloc
 | 
			
		||||
  rm -rf /var/cache/apk
 | 
			
		||||
  gem update --system --no-document
 | 
			
		||||
  gem install -N bundler
 | 
			
		||||
EOT
 | 
			
		||||
ARG BASE_REGISTRY="docker.io"
 | 
			
		||||
FROM ${BASE_REGISTRY}/ruby:${RUBY_VERSION}-alpine AS base
 | 
			
		||||
 | 
			
		||||
ENV RACK_ENV="production" \
 | 
			
		||||
  BUNDLE_DEPLOYMENT=true \
 | 
			
		||||
  BUNDLE_PATH="/usr/local/bundle" \
 | 
			
		||||
  BUNDLE_WITHOUT="development test"
 | 
			
		||||
  BUNDLE_WITHOUT="development test" \
 | 
			
		||||
  RUBY_YJIT_ENABLE=true
 | 
			
		||||
 | 
			
		||||
WORKDIR /kubernaut
 | 
			
		||||
 | 
			
		||||
RUN \
 | 
			
		||||
  --mount=type=cache,id=var-cache-apk,target=/var/cache/apk,sharing=locked \
 | 
			
		||||
  apk update -q; \
 | 
			
		||||
  apk add bash jemalloc
 | 
			
		||||
 | 
			
		||||
RUN \
 | 
			
		||||
  --mount=type=cache,id=usr-local-bundle-cache,target=${BUNDLE_PATH},sharing=locked \
 | 
			
		||||
  gem update --system --no-document; \
 | 
			
		||||
  gem install -N bundler
 | 
			
		||||
 | 
			
		||||
FROM base AS build
 | 
			
		||||
 | 
			
		||||
RUN <<EOT
 | 
			
		||||
  apk add musl-dev gcc make
 | 
			
		||||
  rm -rf /var/cache/apk
 | 
			
		||||
EOT
 | 
			
		||||
RUN \
 | 
			
		||||
  --mount=type=cache,id=var-cache-apk,target=/var/cache/apk,sharing=locked \
 | 
			
		||||
  apk update -q; \
 | 
			
		||||
  apk add musl-dev gcc make; \
 | 
			
		||||
  apk add bash jemalloc
 | 
			
		||||
 | 
			
		||||
COPY Gemfile Gemfile.lock ./
 | 
			
		||||
 | 
			
		||||
RUN <<EOT
 | 
			
		||||
RUN \
 | 
			
		||||
  --mount=type=cache,id=usr-local-bundle-ruby-cache,target=${BUNDLE_PATH}/ruby/3.4.0/cache,sharing=locked \
 | 
			
		||||
  bundle install
 | 
			
		||||
  rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
 | 
			
		||||
EOT
 | 
			
		||||
 | 
			
		||||
COPY . .
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -1,35 +1,46 @@
 | 
			
		||||
ARG RUBY_VERSION="3.4.3"
 | 
			
		||||
FROM docker.io/library/ruby:${RUBY_VERSION}-slim-bookworm AS base
 | 
			
		||||
 | 
			
		||||
WORKDIR /kubernaut
 | 
			
		||||
 | 
			
		||||
RUN <<EOT
 | 
			
		||||
  apt-get update -qq
 | 
			
		||||
  apt-get install --yes --no-install-recommends libjemalloc2
 | 
			
		||||
  rm -rf /var/lib/apt/lists /var/cache/apt/archives
 | 
			
		||||
  gem update --system --no-document
 | 
			
		||||
  gem install -N bundler
 | 
			
		||||
EOT
 | 
			
		||||
ARG BASE_REGISTRY="docker.io"
 | 
			
		||||
ARG DEBIAN_VERSION="bookworm"
 | 
			
		||||
FROM ${BASE_REGISTRY}/ruby:${RUBY_VERSION}-slim-${DEBIAN_VERSION} AS base
 | 
			
		||||
 | 
			
		||||
ENV RACK_ENV="production" \
 | 
			
		||||
  BUNDLE_DEPLOYMENT=true \
 | 
			
		||||
  BUNDLE_PATH="/usr/local/bundle" \
 | 
			
		||||
  BUNDLE_WITHOUT="development test"
 | 
			
		||||
  BUNDLE_WITHOUT="development test" \
 | 
			
		||||
  RUBY_YJIT_ENABLE=true
 | 
			
		||||
 | 
			
		||||
WORKDIR /kubernaut
 | 
			
		||||
 | 
			
		||||
RUN rm -f /etc/apt/apt.conf.d/docker-clean
 | 
			
		||||
 | 
			
		||||
RUN \
 | 
			
		||||
  --mount=type=cache,id=var-cache-apt,target=/var/cache/apt,sharing=locked \
 | 
			
		||||
  --mount=type=cache,id=var-lib-apt,target=/var/lib/apt,sharing=locked \
 | 
			
		||||
  apt-get update -qq; \
 | 
			
		||||
  apt-get install --yes --no-install-recommends \
 | 
			
		||||
  libjemalloc2
 | 
			
		||||
 | 
			
		||||
RUN \
 | 
			
		||||
  --mount=type=cache,id=usr-local-bundle-cache,target=${BUNDLE_PATH},sharing=locked \
 | 
			
		||||
  gem update --system --no-document; \
 | 
			
		||||
  gem install -N bundler
 | 
			
		||||
 | 
			
		||||
ENV DEBIAN_FRONTEND="noninteractive"
 | 
			
		||||
 | 
			
		||||
FROM base AS build
 | 
			
		||||
 | 
			
		||||
RUN <<EOT
 | 
			
		||||
  apt-get update -qq
 | 
			
		||||
  apt-get install --yes --no-install-recommends gcc make libc-dev
 | 
			
		||||
  rm -rf /var/lib/apt/lists /var/cache/apt/archives
 | 
			
		||||
EOT
 | 
			
		||||
RUN \
 | 
			
		||||
  --mount=type=cache,id=var-cache-apt,target=/var/cache/apt,sharing=locked \
 | 
			
		||||
  --mount=type=cache,id=var-lib-apt,target=/var/lib/apt,sharing=locked \
 | 
			
		||||
  apt-get update -qq; \
 | 
			
		||||
  apt-get install --yes --no-install-recommends \
 | 
			
		||||
  build-essential
 | 
			
		||||
 | 
			
		||||
COPY Gemfile Gemfile.lock ./
 | 
			
		||||
 | 
			
		||||
RUN <<EOT
 | 
			
		||||
RUN \
 | 
			
		||||
  --mount=type=cache,id=usr-local-bundle-ruby-cache,target=${BUNDLE_PATH}/ruby/3.4.0/cache,sharing=locked \
 | 
			
		||||
  bundle install
 | 
			
		||||
  rm -rf ~/.bundle/ "${BUNDLE_PATH}"/ruby/*/cache "${BUNDLE_PATH}"/ruby/*/bundler/gems/*/.git
 | 
			
		||||
EOT
 | 
			
		||||
 | 
			
		||||
COPY . .
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user