Add initial GitHub Actions CI
This commit is contained in:
parent
a49d5469e0
commit
a3d3e7f324
|
|
@ -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
|
||||||
|
|
@ -3,7 +3,7 @@ set -Eeuo pipefail
|
||||||
|
|
||||||
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."
|
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."
|
||||||
|
|
||||||
files="$(find -name '*.yml')"
|
files="$(find -name '*.yml' -not -path './.github/*')"
|
||||||
need=()
|
need=()
|
||||||
needdiff=
|
needdiff=
|
||||||
for f in $files; do
|
for f in $files; do
|
||||||
|
|
@ -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
.travis.yml
17
.travis.yml
|
|
@ -1,17 +0,0 @@
|
||||||
branches:
|
|
||||||
only:
|
|
||||||
- master
|
|
||||||
|
|
||||||
language: bash
|
|
||||||
services: docker
|
|
||||||
|
|
||||||
install:
|
|
||||||
- docker pull tianon/markdownfmt
|
|
||||||
- docker pull tianon/ymlfmt
|
|
||||||
|
|
||||||
script:
|
|
||||||
- .travis/check-markdownfmt.sh
|
|
||||||
- .travis/check-ymlfmt.sh
|
|
||||||
- .travis/check-short.sh
|
|
||||||
- .travis/check-required-files.sh
|
|
||||||
- .travis/check-pr-no-readme.sh
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
set -Eeuo pipefail
|
|
||||||
|
|
||||||
cd "$(dirname "$(readlink -f "$BASH_SOURCE")")/.."
|
|
||||||
|
|
||||||
if [ "$TRAVIS_PULL_REQUEST" != 'false' ]; then
|
|
||||||
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
|
|
||||||
fi
|
|
||||||
|
|
@ -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.
|
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.
|
||||||
|
|
||||||
- [](https://travis-ci.org/docker-library/docs)
|
- [](https://github.com/docker-library/docs/actions?query=workflow%3A%22GitHub+CI%22+branch%3Amaster)
|
||||||
- [](https://doi-janky.infosiftr.net/job/docs/job/library/)
|
- [](https://doi-janky.infosiftr.net/job/docs/job/library/)
|
||||||
- [](https://doi-janky.infosiftr.net/job/docs/job/amd64/)
|
- [](https://doi-janky.infosiftr.net/job/docs/job/amd64/)
|
||||||
- [](https://doi-janky.infosiftr.net/job/docs/job/arm32v5/)
|
- [](https://doi-janky.infosiftr.net/job/docs/job/arm32v5/)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue