forked from matomo-org/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
set param in php.ini, revamp github CI
- Loading branch information
1 parent
d4744fb
commit ee5b9ce
Showing
2 changed files
with
57 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,62 @@ | ||
name: GitHub CI | ||
name: Actions CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
schedule: | ||
- cron: 0 0 * * 0 | ||
on: push | ||
|
||
defaults: | ||
run: | ||
shell: 'bash -Eeuo pipefail -x {0}' | ||
env: | ||
GCP_PROJECT: relay-cuatro | ||
REGISTRY_HOSTNAME: us.gcr.io | ||
REPOSITORY: matomo | ||
|
||
jobs: | ||
generate-jobs: | ||
name: Generate Jobs | ||
build-docker-image: | ||
name: Build Docker Image 🐳📦 | ||
runs-on: ubuntu-latest | ||
outputs: | ||
strategy: ${{ steps.generate-jobs.outputs.strategy }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- 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 }} | ||
if: startsWith(github.ref, 'refs/tags/v') | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
- 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 }} | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Determine the release version | ||
run: echo "::set-env name=TAG::$(echo "${{ github.ref }}" | awk -F / '{print $3}')" | ||
|
||
- name: Determine the Docker image tag | ||
run: echo "::set-env name=IMAGE_TAG::$REGISTRY_HOSTNAME/$GCP_PROJECT/$REPOSITORY:$TAG" | ||
|
||
- name: Build the Docker image | ||
run: cd ./fpm-alpine && docker build . -t "$IMAGE_TAG" | ||
|
||
- name: Log in to GCP | ||
uses: GoogleCloudPlatform/github-actions/setup-gcloud@20c294aabd5331f9f7b8a26e6075d41c31ce5e0d | ||
with: | ||
service_account_key: ${{ secrets.GCLOUD_JSON_KEY }} | ||
|
||
- name: Authorize Docker with GCR | ||
run: gcloud auth configure-docker | ||
|
||
- name: Push the Docker image | ||
run: docker push $IMAGE_TAG | ||
|
||
- name: Create a GitHub Release | ||
id: create_release | ||
uses: NFIBrokerage/create-release@v2 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ env.TAG }} | ||
release_name: Release ${{ env.TAG }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: Notify ops channel of build success | ||
run: > | ||
curl | ||
-X POST | ||
-H 'Content-type:application/json' | ||
-d "{\"text\":\":partydocker: image built for $REPOSITORY - tag $(git tag -ln $TAG)\"}" | ||
$SLACK_WEBHOOK | ||
env: | ||
SLACK_WEBHOOK: ${{ secrets.OPS_CHANNEL_SLACK_WEBHOOK }} | ||
TAG: ${{ env.TAG }} | ||
|
||
# Generated by Elixir.Gaas.Generators.Simple.Actions.Ci |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
always_populate_raw_post_data=-1 | ||
geoip.custom_directory=/var/www/html/misc | ||
display_errors=Off | ||
post_max_size=16M |