Skip to content

Commit b44c4f1

Browse files
authored
Merge pull request #1011 from docker-library/github-actions
Add initial GitHub Actions CI
2 parents 6ae59ac + 5dc2907 commit b44c4f1

File tree

4 files changed

+49
-86
lines changed

4 files changed

+49
-86
lines changed

.github/workflows/ci.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: GitHub CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
schedule:
7+
- cron: 0 0 * * 0
8+
9+
defaults:
10+
run:
11+
shell: 'bash -Eeuo pipefail -x {0}'
12+
13+
jobs:
14+
15+
generate-jobs:
16+
name: Generate Jobs
17+
runs-on: ubuntu-latest
18+
outputs:
19+
strategy: ${{ steps.generate-jobs.outputs.strategy }}
20+
steps:
21+
- uses: actions/checkout@v1
22+
- id: generate-jobs
23+
name: Generate Jobs
24+
run: |
25+
git clone --depth 1 https://github.com/docker-library/bashbrew.git -b master ~/bashbrew
26+
strategy="$(~/bashbrew/scripts/github-actions/generate.sh)"
27+
jq . <<<"$strategy" # sanity check / debugging aid
28+
echo "::set-output name=strategy::$strategy"
29+
30+
test:
31+
needs: generate-jobs
32+
strategy: ${{ fromJson(needs.generate-jobs.outputs.strategy) }}
33+
name: ${{ matrix.name }}
34+
runs-on: ${{ matrix.os }}
35+
steps:
36+
- uses: actions/checkout@v1
37+
- name: Prepare Environment
38+
run: ${{ matrix.runs.prepare }}
39+
- name: Pull Dependencies
40+
run: ${{ matrix.runs.pull }}
41+
- name: Build ${{ matrix.name }}
42+
run: ${{ matrix.runs.build }}
43+
- name: History ${{ matrix.name }}
44+
run: ${{ matrix.runs.history }}
45+
- name: Test ${{ matrix.name }}
46+
run: ${{ matrix.runs.test }}
47+
- name: '"docker images"'
48+
run: ${{ matrix.runs.images }}

.travis.yml

-71
This file was deleted.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ For outstanding `php` image PRs, check [PRs with the "library/php" label on the
1414

1515
---
1616

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

2020
| Build | Status | Badges | (per-arch) |

update.sh

-14
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ generated_warning() {
4545
EOH
4646
}
4747

48-
travisEnv=
4948
for version in "${versions[@]}"; do
5049
rcVersion="${version%-rc}"
5150

@@ -258,17 +257,4 @@ for version in "${versions[@]}"; do
258257
entrypoint="$(dirname "$dockerfile")/docker-php-entrypoint"
259258
sed -i 's! php ! '"$cmd"' !g' "$entrypoint"
260259
done
261-
262-
newTravisEnv=
263-
for dockerfile in "${dockerfiles[@]}"; do
264-
dir="${dockerfile%Dockerfile}"
265-
dir="${dir%/}"
266-
variant="${dir#$version}"
267-
variant="${variant#/}"
268-
newTravisEnv+='\n - VERSION='"$version VARIANT=$variant"
269-
done
270-
travisEnv="$newTravisEnv$travisEnv"
271260
done
272-
273-
travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
274-
echo "$travis" > .travis.yml

0 commit comments

Comments
 (0)