From eb0075f6c488c1aeef6eed979ed88bd611644add Mon Sep 17 00:00:00 2001 From: Michael Kriese Date: Fri, 30 Apr 2021 17:08:54 +0200 Subject: [PATCH] feat: initial --- .dockerignore | 1 + .editorconfig | 10 ++++++++++ .prettierrc | 4 ++++ Dockerfile | 12 ++++++++++++ LICENSE | 2 +- README.md | 10 ++++++++-- builder.json | 6 ++++++ renovate.Dockerfile | 17 +++++++++++++++++ renovate.json | 4 ++++ workflows/build.yml | 33 +++++++++++++++++++++++++++++++++ 10 files changed, 96 insertions(+), 3 deletions(-) create mode 100644 .dockerignore create mode 100644 .editorconfig create mode 100644 .prettierrc create mode 100644 Dockerfile create mode 100644 builder.json create mode 100644 renovate.Dockerfile create mode 100644 renovate.json create mode 100644 workflows/build.yml diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..72e8ffc --- /dev/null +++ b/.dockerignore @@ -0,0 +1 @@ +* diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..0f09989 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,10 @@ +# editorconfig.org +root = true + +[*] +indent_style = space +indent_size = 2 +end_of_line = lf +charset = utf-8 +trim_trailing_whitespace = true +insert_final_newline = true diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..c1a6f66 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,4 @@ +{ + "singleQuote": true, + "trailingComma": "es5" +} diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..ccf050a --- /dev/null +++ b/Dockerfile @@ -0,0 +1,12 @@ +# renovate: datasource=github-releases depName=containerbase/ruby-prebuild versioning=ruby +ARG RUBY_VERSION=2.7.3 + +FROM ghcr.io/containerbase/buildpack:1.3.0@sha256:8d0bd58e02d271304e6ab378aede3927dd2cfb98cdae59d0e8bf6f66a5393963 + +ARG RUBY_VERSION +RUN install-tool ruby + +LABEL org.opencontainers.image.source="https://github.com/containerbase/ruby" \ + org.opencontainers.image.version="${RUBY_VERSION}" + +USER 1000 diff --git a/LICENSE b/LICENSE index 5376412..7064459 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Container Base +Copyright (c) 2021 WhiteSource Ltd Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 36fc3bf..7cb3684 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,8 @@ -# ruby -containerbase ruby +![Build status](https://github.com/containerbase/ruby/workflows/build/badge.svg) +![Docker Image Size (latest)](https://img.shields.io/docker/image-size/containerbase/ruby/latest) +[![Docker Image Version](https://img.shields.io/docker/v/containerbase/ruby/latest)](https://hub.docker.com/r/containerbase/ruby) +![GitHub](https://img.shields.io/github/license/containerbase/ruby) + +# containerbase ruby + +This repository is the source for the Docker Hub image `containerbase/ruby`. Commits to `main` branch are automatically built and published. diff --git a/builder.json b/builder.json new file mode 100644 index 0000000..386299b --- /dev/null +++ b/builder.json @@ -0,0 +1,6 @@ +{ + "image": "ruby", + "startVersion": "2.5.0", + "cache": "docker-build-cache", + "ignoredVersions": ["2.5.2"] +} diff --git a/renovate.Dockerfile b/renovate.Dockerfile new file mode 100644 index 0000000..2ee4a67 --- /dev/null +++ b/renovate.Dockerfile @@ -0,0 +1,17 @@ +#------------------------- +# renovate rebuild trigger +# https://www.ruby-lang.org/en/downloads/branches/ +#------------------------- + +# makes lint happy +FROM scratch + +# EOL: 2022-03-31 +# renovate: datasource=github-releases depName=containerbase/ruby-prebuild versioning=ruby +ENV PHP_VERSION=2.6.7 + +# renovate: datasource=github-releases depName=containerbase/ruby-prebuild versioning=ruby +ENV PHP_VERSION=2.7.3 + +# renovate: datasource=github-releases depName=containerbase/ruby-prebuild versioning=ruby +ENV PHP_VERSION=3.0.1 diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..d3e7c7e --- /dev/null +++ b/renovate.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://docs.renovatebot.com/renovate-schema.json", + "extends": ["github>containerbase/.github"] +} diff --git a/workflows/build.yml b/workflows/build.yml new file mode 100644 index 0000000..d52b79d --- /dev/null +++ b/workflows/build.yml @@ -0,0 +1,33 @@ +name: build + +on: + push: + branches: + - main + - 'renovate/**' + + pull_request: + +env: + DRY_RUN: ${{ github.ref != 'refs/heads/main' }} + OWNER: ${{ github.repository_owner }} + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2.3.4 + + - name: Docker registry login + if: env.DRY_RUN == 'false' + run: | + echo "${{ secrets.DOCKER_PASSWORD }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin + echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ env.OWNER }} --password-stdin + + - name: Publish + uses: renovatebot/internal-tools@v1.6.1 + with: + command: docker-builder + image-prefix: ${{ env.OWNER }} + dry-run: ${{ env.DRY_RUN }}