Skip to content

Add initial GitHub Actions CI #1011

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -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 }}
71 changes: 0 additions & 71 deletions .travis.yml

This file was deleted.

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ For outstanding `php` image PRs, check [PRs with the "library/php" label on the

---

- [![build status badge](https://img.shields.io/travis/docker-library/php/master.svg?label=Travis%20CI)](https://travis-ci.org/docker-library/php/branches)
- [![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)
- [![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/)

| Build | Status | Badges | (per-arch) |
Expand Down
14 changes: 0 additions & 14 deletions update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ generated_warning() {
EOH
}

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

Expand Down Expand Up @@ -258,17 +257,4 @@ for version in "${versions[@]}"; do
entrypoint="$(dirname "$dockerfile")/docker-php-entrypoint"
sed -i 's! php ! '"$cmd"' !g' "$entrypoint"
done

newTravisEnv=
for dockerfile in "${dockerfiles[@]}"; do
dir="${dockerfile%Dockerfile}"
dir="${dir%/}"
variant="${dir#$version}"
variant="${variant#/}"
newTravisEnv+='\n - VERSION='"$version VARIANT=$variant"
done
travisEnv="$newTravisEnv$travisEnv"
done

travis="$(awk -v 'RS=\n\n' '$1 == "env:" { $0 = "env:'"$travisEnv"'" } { printf "%s%s", $0, RS }' .travis.yml)"
echo "$travis" > .travis.yml