Skip to content

Commit

Permalink
Add initial GitHub Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
tianon committed May 1, 2020
1 parent a49d546 commit a3d3e7f
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 36 deletions.
File renamed without changes.
14 changes: 14 additions & 0 deletions .ci/check-pr-no-readme.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
set -Eeuo pipefail

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."

git fetch -q https://github.com/docker-library/docs.git master
if [ -n "$(git diff --numstat FETCH_HEAD...HEAD -- '*/README.md')" ]; then
echo >&2 'Error: at least one repo README.md has changed'
echo >&2 'These files are autogenerated, so it is unnecessary to modify them'
echo >&2 'Please update content.md and docker-library-bot will take care of README.md'
echo >&2 'See: https://github.com/docker-library/docs/#image-namereadmemd'
echo >&2
exit 1
fi
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion .travis/check-ymlfmt.sh → .ci/check-ymlfmt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ set -Eeuo pipefail

cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."

files="$(find -name '*.yml')"
files="$(find -name '*.yml' -not -path './.github/*')"
need=()
needdiff=
for f in $files; do
Expand Down
File renamed without changes.
43 changes: 43 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: GitHub CI

on:
pull_request:
push:
branches:
- master
schedule:
- cron: 0 0 * * 0

defaults:
run:
shell: 'bash -Eeuo pipefail -x {0}'

jobs:
markdownfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker pull tianon/markdownfmt
- run: .ci/check-markdownfmt.sh
ymlfmt:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: docker pull tianon/ymlfmt
- run: .ci/check-ymlfmt.sh
short:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: .ci/check-short.sh
required-files:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: .ci/check-required-files.sh
no-readme:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: .ci/check-pr-no-readme.sh
if: ${{ github.event_name == 'pull_request' }}
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

16 changes: 0 additions & 16 deletions .travis/check-pr-no-readme.sh

This file was deleted.

4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

This repository contains the image documentation for each of the official images. See [docker-library/official-images](https://github.com/docker-library/official-images) for more information about the program in general.

All Markdown files here are run through [tianon's fork of `markdownfmt`](https://github.com/tianon/markdownfmt) (only forked to add some smaller-diff preference and minor DockerHub-compatibility changes), and verified as formatted correctly via Travis CI.
All Markdown files here are run through [tianon's fork of `markdownfmt`](https://github.com/tianon/markdownfmt) (only forked to add some smaller-diff preference and minor DockerHub-compatibility changes), and verified as formatted correctly via GitHub Actions.

- [![Travis CI status badge](https://img.shields.io/travis/docker-library/docs/master.svg?label=Travis%20CI)](https://travis-ci.org/docker-library/docs)
- [![GitHub CI status badge](https://img.shields.io/github/workflow/status/docker-library/docs/GitHub%20CI/master?label=GitHub%20CI)](https://github.com/docker-library/docs/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster)
- [![library update.sh status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/docs/job/library.svg?label=Automated%20library%20update.sh)](https://doi-janky.infosiftr.net/job/docs/job/library/)
- [![amd64 update.sh status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/docs/job/amd64.svg?label=Automated%20amd64%20update.sh)](https://doi-janky.infosiftr.net/job/docs/job/amd64/)
- [![arm32v5 update.sh status badge](https://img.shields.io/jenkins/s/https/doi-janky.infosiftr.net/job/docs/job/arm32v5.svg?label=Automated%20arm32v5%20update.sh)](https://doi-janky.infosiftr.net/job/docs/job/arm32v5/)
Expand Down

0 comments on commit a3d3e7f

Please sign in to comment.