Use default Docker container for GitHub Actions (#3019)

This commit is contained in:
Peter Hedenskog 2020-05-29 13:43:53 +02:00 committed by GitHub
parent 1c649d9edf
commit 4fb9f0dd14
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 0 additions and 64 deletions

View File

@ -1,11 +0,0 @@
ARG version
FROM sitespeedio/sitespeed.io:${version}
LABEL "com.github.actions.name"="Run sitespeed.io"
LABEL "com.github.actions.description"="Test the performance of your web site"
LABEL "com.github.actions.icon"="monitor"
LABEL "com.github.actions.color"="blue"
LABEL "repository"="https://github.com/sitespeedio/sitespeed.io"
LABEL "homepage"="https://www.sitespeed.io/documentation/sitespeed.io/continuous-integration/#github-actions"
LABEL "maintainer"="Peter Hedenskog <peter@soulgalore.com>"

View File

@ -1,50 +0,0 @@
# sitespeed.io GitHub action
If you are using [GitHub Actions](https://github.com/features/actions) beta it's super easy to run sitespeed.io. Remember though that actions are in beta and can change. They are running an small instances at the moment so you shouldn't rely on timing metrics.
Actions works good with a [performance budget](https://www.sitespeed.io/documentation/sitespeed.io/performance-budget/). You should set your budget in a file in the repo that you are testing. In this example we call the file *budget.json* and put it in the *.github* folder in the repo.
Setup a simple budget that check the URLs you test against number of requests, transfer sise, third parties and different Coach scores ([read the documentation](https://www.sitespeed.io/documentation/sitespeed.io/performance-budget/#full-example) on how to configure other metrics):
```json
{
"budget": {
"requests": {
"total": 100
},
"transferSize": {
"total": 400000
},
"thirdParty": {
"requests": 0
},
"score": {
"accessibility": 100,
"bestpractice": 100,
"privacy": 100,
"performance": 100
}
}
}
```
Then you can setup your action either via the GitHub GUI or using configuration. Make sure to setup your action to the right Docker file: ```docker://sitespeedio/sitespeed.io:8.0.6-action```.
A simple setup looks something like this:
```shell
workflow "Testing stage environment" {
on = "push"
resolves = ["Run sitespeed.io"]
}
action "Run sitespeed.io" {
uses = "docker://sitespeedio/sitespeed.io:8.0.6-action"
args = "https://www.sitespeed.io -n 1 --budget.configPath /github/workspace/.github/budget.json"
}
```
As argument you can use all [configurations options](https://www.sitespeed.io/documentation/sitespeed.io/configuration/#the-options) as you usually do with sitespeed.io. Since we don't use any timing metrics in the budget we only do one run.
If your budget fails, your action will fail.
When there's a new sitespeed.io release and you wanna use that you just bump the version number of your action.

View File

@ -22,9 +22,6 @@ docker push sitespeedio/sitespeed.io:latest
docker build --no-cache -t sitespeedio/sitespeed.io:$PACKAGE_VERSION-slim --file Dockerfile-slim .
docker push sitespeedio/sitespeed.io:$PACKAGE_VERSION-slim
docker build -t sitespeedio/sitespeed.io:$PACKAGE_VERSION-action --build-arg version=$PACKAGE_VERSION --file docker/github-action/Dockerfile .
docker push sitespeedio/sitespeed.io:$PACKAGE_VERSION-action
docker build -t sitespeedio/sitespeed.io:$PACKAGE_VERSION-plus1 --build-arg version=$PACKAGE_VERSION --file docker/Dockerfile-plus1 .
docker push sitespeedio/sitespeed.io:$PACKAGE_VERSION-plus1