Merge pull request #73 from docker-library/github-actions

Add initial GitHub Actions CI
This commit is contained in:
yosifkit 2020-04-28 18:13:18 -07:00 committed by GitHub
commit 9ef4804c28
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 66 additions and 25 deletions

61
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,61 @@
name: GitHub CI
on:
pull_request:
push:
schedule:
- cron: 0 0 * * 0
defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'
jobs:
verify:
name: Verify Binaries
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Update Binaries
run: ./update.sh
- name: Verify Changes
run: |
changes="$(git status --porcelain '**/hello' '**/nanoserver*/hello.txt')"
test -z "$changes"
generate-jobs:
needs: verify
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,20 +0,0 @@
language: bash
services: docker
install:
- git clone https://github.com/docker-library/official-images.git ~/official-images
before_script:
- env | sort
- image='hello-world'
script:
- ./update.sh
- test -z "$(git status --porcelain '**/hello' '**/nanoserver*/hello.txt')"
- travis_retry docker build -t "$image" amd64/hello-world
- ~/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 `hello-world` image PRs, check [PRs with the "library/hello-worl
---
- [![build status badge](https://img.shields.io/travis/docker-library/hello-world/master.svg?label=Travis%20CI)](https://travis-ci.org/docker-library/hello-world/branches)
- [![build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/update.sh/job/hello-world.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/hello-world)
- [![build status badge](https://img.shields.io/github/workflow/status/docker-library/hello-world/GitHub%20CI/master?label=GitHub%20CI)](https://github.com/docker-library/hello-world/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/hello-world.svg?label=Automated%20update.sh)](https://doi-janky.infosiftr.net/job/update.sh/job/hello-world/)
| 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/hello-world.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/hello-world) | [![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/hello-world.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/hello-world) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/hello-world.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/hello-world) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/hello-world.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/hello-world) |
| [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/hello-world.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/hello-world) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/hello-world.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/hello-world) | [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/hello-world.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/hello-world) | [![windows-amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/windows-amd64/job/hello-world.svg?label=windows-amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/windows-amd64/job/hello-world) |
| [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/hello-world.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/hello-world) |
| [![amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/amd64/job/hello-world.svg?label=amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/amd64/job/hello-world/) | [![arm32v5 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/hello-world.svg?label=arm32v5)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v5/job/hello-world/) | [![arm32v7 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/hello-world.svg?label=arm32v7)](https://doi-janky.infosiftr.net/job/multiarch/job/arm32v7/job/hello-world/) | [![arm64v8 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/hello-world.svg?label=arm64v8)](https://doi-janky.infosiftr.net/job/multiarch/job/arm64v8/job/hello-world/) |
| [![i386 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/i386/job/hello-world.svg?label=i386)](https://doi-janky.infosiftr.net/job/multiarch/job/i386/job/hello-world/) | [![mips64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/hello-world.svg?label=mips64le)](https://doi-janky.infosiftr.net/job/multiarch/job/mips64le/job/hello-world/) | [![ppc64le build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/hello-world.svg?label=ppc64le)](https://doi-janky.infosiftr.net/job/multiarch/job/ppc64le/job/hello-world/) | [![s390x build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/s390x/job/hello-world.svg?label=s390x)](https://doi-janky.infosiftr.net/job/multiarch/job/s390x/job/hello-world/) |
| [![windows-amd64 build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/multiarch/job/windows-amd64/job/hello-world.svg?label=windows-amd64)](https://doi-janky.infosiftr.net/job/multiarch/job/windows-amd64/job/hello-world/) | [![put-shared build status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/put-shared/job/light/job/hello-world.svg?label=put-shared)](https://doi-janky.infosiftr.net/job/put-shared/job/light/job/hello-world/) |
<!-- THIS FILE IS GENERATED BY https://github.com/docker-library/docs/blob/master/generate-repo-stub-readme.sh -->