1
0
Fork 0
mirror of https://github.com/docker-library/ruby.git synced 2022-11-09 11:41:34 -05:00

Add initial GitHub Actions CI

This commit is contained in:
Tianon Gravi 2020-04-28 16:04:33 -07:00
parent 96bcb37cc3
commit 3bda762014
4 changed files with 53 additions and 53 deletions

48
.github/workflows/ci.yml vendored Normal file
View file

@ -0,0 +1,48 @@
name: GitHub CI
on:
pull_request:
push:
schedule:
- cron: 0 0 * * 0
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
generate-jobs:
name: Generate Jobs
runs-on: ubuntu-latest
outputs:
strategy: ${{ steps.generate-jobs.outputs.strategy }}
steps:
- uses: actions/checkout@v1
- id: generate-jobs
name: Generate Jobs
run: |
git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew
strategy="$(~/bashbrew/scripts/github-actions/generate.sh)"
jq . <<<"$strategy" # sanity check / debugging aid
echo "::set-output name=strategy::$strategy"
test:
needs: generate-jobs
strategy: ${{ fromJson(needs.generate-jobs.outputs.strategy) }}
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
- name: Prepare Environment
run: ${{ matrix.runs.prepare }}
- name: Pull Dependencies
run: ${{ matrix.runs.pull }}
- name: Build ${{ matrix.name }}
run: ${{ matrix.runs.build }}
- name: History ${{ matrix.name }}
run: ${{ matrix.runs.history }}
- name: Test ${{ matrix.name }}
run: ${{ matrix.runs.test }}
- name: '"docker images"'
run: ${{ matrix.runs.images }}

View file

@ -1,42 +0,0 @@
language: bash
services: docker
env:
- VERSION=2.7 VARIANT=buster
- VERSION=2.7 VARIANT=buster/slim
- VERSION=2.7 VARIANT=alpine3.11
- VERSION=2.7 VARIANT=alpine3.10
- VERSION=2.6 VARIANT=buster
- VERSION=2.6 VARIANT=buster/slim
- VERSION=2.6 VARIANT=stretch
- VERSION=2.6 VARIANT=stretch/slim
- VERSION=2.6 VARIANT=alpine3.11
- VERSION=2.6 VARIANT=alpine3.10
- VERSION=2.5 VARIANT=buster
- VERSION=2.5 VARIANT=buster/slim
- VERSION=2.5 VARIANT=stretch
- VERSION=2.5 VARIANT=stretch/slim
- VERSION=2.5 VARIANT=alpine3.11
- VERSION=2.5 VARIANT=alpine3.10
install:
- git clone --depth 1 https://github.com/docker-library/official-images.git ~/official-images
before_script:
- env | sort
- cd "$VERSION/$VARIANT"
- slash='/'; image="ruby:${VERSION}-${VARIANT//$slash/-}"
script:
- |
(
set -Eeuo pipefail
set -x
travis_retry docker build -t "$image" .
~/official-images/test/run.sh "$image"
)
after_script:
- docker images
# vim:set et ts=2 sw=2:

View file

@ -14,13 +14,13 @@ For outstanding `ruby` image PRs, check [PRs with the "library/ruby" label on th
---
- [![build status badge](https://img.shields.io/travis/docker-library/ruby/master.svg?label=Travis%20CI)](https://travis-ci.org/docker-library/ruby/branches)
- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/ruby.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/ruby)
- [![build status badge](https://img.shields.io/github/workflow/status/docker-library/ruby/GitHub%20CI/master?label=GitHub%20CI)](https://github.com/docker-library/ruby/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster)
- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/ruby.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/ruby/)
| Build | Status | Badges | (per-arch) |
|:-:|:-:|:-:|:-:|
| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/ruby.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/ruby) | [![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/ruby.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/ruby) | [![arm32v6 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/ruby.svg?label=arm32v6)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/ruby) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/ruby.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/ruby) |
| [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/ruby.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/ruby) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/ruby.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/ruby) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/ruby.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/ruby) | [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/ruby.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/ruby) |
| [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/ruby.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/ruby) |
| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/ruby.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/ruby/) | [![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/ruby.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/ruby/) | [![arm32v6 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/ruby.svg?label=arm32v6)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v6/job/ruby/) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/ruby.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/ruby/) |
| [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/ruby.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/ruby/) | [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/ruby.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/ruby/) | [![mips64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/ruby.svg?label=mips64le)](https://doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/ruby/) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/ruby.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/ruby/) |
| [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/ruby.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/ruby/) | [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/ruby.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/ruby/) |
<!-- THIS FILE IS GENERATED BY https://github.com/docker-library/docs/blob/master/generate-repo-stub-readme.sh -->

View file

@ -25,7 +25,6 @@ declare -A newEnoughRubygems=(
)
# TODO once all versions are in this family of "new enough", remove RUBYGEMS_VERSION code entirely
travisEnv=
for version in "${versions[@]}"; do
rcGrepV='-v'
rcVersion="${version%-rc}"
@ -108,10 +107,5 @@ for version in "${versions[@]}"; do
if [ -n "${newEnoughRubygems[$rcVersion]:-}" ]; then
sed -ri -e '/RUBYGEMS_VERSION/d' "$dir/Dockerfile"
fi
travisEnv='\n - VERSION='"$version VARIANT=$v$travisEnv"
done
done
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
echo "$travis" > .travis.yml