Update dependency mikefarah/yq to v4.2.0 #10
23
.chglog/CHANGELOG.tpl.md
Executable file
23
.chglog/CHANGELOG.tpl.md
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
{{ range .Versions -}}
|
||||||
|
## {{ if .Tag.Previous }}[{{ .Tag.Name }}]({{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}){{ else }}{{ .Tag.Name }}{{ end }} ({{ datetime "2006-01-02" .Tag.Date }})
|
||||||
|
|
||||||
|
{{ range .CommitGroups -}}
|
||||||
|
### {{ .Title }}
|
||||||
|
|
||||||
|
{{ range .Commits -}}
|
||||||
|
- {{ if .Scope }}**{{ .Scope }}:** {{ end }}{{ (regexReplaceAll "(.*)/issues/(.*)" (regexReplaceAll "(Co-\\w*-by.*)" .Subject "") "${1}/pulls/${2}") | trim }}
|
||||||
|
{{ end }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{- if .NoteGroups -}}
|
||||||
|
{{ range .NoteGroups -}}
|
||||||
|
### {{ .Title }}
|
||||||
|
|
||||||
|
{{ range .Notes }}
|
||||||
|
{{ .Body }}
|
||||||
|
{{ end }}
|
||||||
|
{{ end -}}
|
||||||
|
{{ end -}}
|
||||||
|
{{ end -}}
|
25
.chglog/config.yml
Executable file
25
.chglog/config.yml
Executable file
@ -0,0 +1,25 @@
|
|||||||
|
style: github
|
||||||
|
template: CHANGELOG.tpl.md
|
||||||
|
info:
|
||||||
|
title: CHANGELOG
|
||||||
|
repository_url: https://gitea.rknet.org/docker/lhci
|
||||||
|
options:
|
||||||
|
commit_groups:
|
||||||
|
title_maps:
|
||||||
|
feat: Features
|
||||||
|
fix: Bug Fixes
|
||||||
|
perf: Performance Improvements
|
||||||
|
refactor: Code Refactoring
|
||||||
|
chore: Others
|
||||||
|
test: Testing
|
||||||
|
ci: CI Pipeline
|
||||||
|
docs: Documentation
|
||||||
|
header:
|
||||||
|
pattern: "^(\\w*)(?:\\(([\\w\\$\\.\\-\\*\\s]*)\\))?\\:\\s(.*)$"
|
||||||
|
pattern_maps:
|
||||||
|
- Type
|
||||||
|
- Scope
|
||||||
|
- Subject
|
||||||
|
notes:
|
||||||
|
keywords:
|
||||||
|
- BREAKING CHANGE
|
279
.drone.yml
279
.drone.yml
@ -7,16 +7,16 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: markdownlint
|
- name: markdownlint
|
||||||
image: thegeeklab/markdownlint-cli
|
image: thegeeklab/markdownlint-cli
|
||||||
commands:
|
commands:
|
||||||
- markdownlint 'README.md'
|
- markdownlint 'README.md'
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/master
|
- refs/heads/main
|
||||||
- refs/pull/**
|
- refs/pull/**
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@ -27,97 +27,106 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: dryrun
|
- name: dryrun
|
||||||
image: plugins/docker:19
|
image: thegeeklab/drone-docker-buildx:23
|
||||||
settings:
|
settings:
|
||||||
build_args:
|
dockerfile: Dockerfile
|
||||||
- BUILD_VERSION=${DRONE_TAG%-*}
|
dry_run: true
|
||||||
dockerfile: Dockerfile
|
provenance: false
|
||||||
dry_run: true
|
repo: thegeeklab/${DRONE_REPO_NAME}
|
||||||
password:
|
when:
|
||||||
from_secret: docker_password
|
ref:
|
||||||
repo: thegeeklab/${DRONE_REPO_NAME}
|
- refs/pull/**
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/pull/**
|
|
||||||
|
|
||||||
- name: tags
|
- name: tags
|
||||||
image: thegeeklab/docker-autotag
|
image: thegeeklab/docker-autotag
|
||||||
environment:
|
environment:
|
||||||
DOCKER_AUTOTAG_FORCE_LATEST: True
|
DOCKER_AUTOTAG_FORCE_LATEST: True
|
||||||
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
|
DOCKER_AUTOTAG_IGNORE_PRERELEASE: True
|
||||||
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
|
DOCKER_AUTOTAG_OUTPUT_FILE: .tags
|
||||||
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
|
DOCKER_AUTOTAG_VERSION: ${DRONE_TAG}
|
||||||
when:
|
when:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/master
|
- refs/heads/main
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
depends_on:
|
depends_on:
|
||||||
- dryrun
|
- dryrun
|
||||||
|
|
||||||
- name: publish-dockerhub
|
- name: changelog-generate
|
||||||
image: plugins/docker:19
|
image: thegeeklab/git-chglog
|
||||||
settings:
|
commands:
|
||||||
build_args:
|
- git fetch -tq
|
||||||
- BUILD_VERSION=${DRONE_TAG%-*}
|
- git-chglog --no-color --no-emoji -o CHANGELOG.md ${DRONE_TAG:---next-tag unreleased unreleased}
|
||||||
dockerfile: Dockerfile
|
depends_on:
|
||||||
password:
|
- tags
|
||||||
from_secret: docker_password
|
|
||||||
repo: thegeeklab/${DRONE_REPO_NAME}
|
|
||||||
username:
|
|
||||||
from_secret: docker_username
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/heads/master
|
|
||||||
- refs/tags/**
|
|
||||||
depends_on:
|
|
||||||
- tags
|
|
||||||
|
|
||||||
- name: publish-quay
|
- name: changelog-format
|
||||||
image: plugins/docker:19
|
image: thegeeklab/alpine-tools
|
||||||
settings:
|
commands:
|
||||||
build_args:
|
- prettier CHANGELOG.md
|
||||||
- BUILD_VERSION=${DRONE_TAG%-*}
|
- prettier -w CHANGELOG.md
|
||||||
dockerfile: Dockerfile
|
depends_on:
|
||||||
password:
|
- changelog-generate
|
||||||
from_secret: quay_password
|
|
||||||
registry: quay.io
|
|
||||||
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
|
||||||
username:
|
|
||||||
from_secret: quay_username
|
|
||||||
when:
|
|
||||||
ref:
|
|
||||||
- refs/heads/master
|
|
||||||
- refs/tags/**
|
|
||||||
depends_on:
|
|
||||||
- tags
|
|
||||||
|
|
||||||
- name: publish-gitea
|
- name: publish-dockerhub
|
||||||
image: plugins/gitea-release
|
image: thegeeklab/drone-docker-buildx:23
|
||||||
settings:
|
settings:
|
||||||
api_key:
|
dockerfile: Dockerfile
|
||||||
from_secret: gitea_token
|
password:
|
||||||
base_url: https://gitea.rknet.org
|
from_secret: docker_password
|
||||||
note: CHANGELOG.md
|
provenance: false
|
||||||
overwrite: true
|
repo: thegeeklab/${DRONE_REPO_NAME}
|
||||||
title: ${DRONE_TAG}
|
username:
|
||||||
when:
|
from_secret: docker_username
|
||||||
ref:
|
when:
|
||||||
- refs/tags/**
|
ref:
|
||||||
depends_on:
|
- refs/heads/main
|
||||||
- publish-dockerhub
|
- refs/tags/**
|
||||||
- publish-quay
|
depends_on:
|
||||||
|
- changelog-format
|
||||||
|
|
||||||
|
- name: publish-quay
|
||||||
|
image: thegeeklab/drone-docker-buildx:23
|
||||||
|
settings:
|
||||||
|
dockerfile: Dockerfile
|
||||||
|
password:
|
||||||
|
from_secret: quay_password
|
||||||
|
provenance: false
|
||||||
|
registry: quay.io
|
||||||
|
repo: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||||
|
username:
|
||||||
|
from_secret: quay_username
|
||||||
|
when:
|
||||||
|
ref:
|
||||||
|
- refs/heads/main
|
||||||
|
- refs/tags/**
|
||||||
|
depends_on:
|
||||||
|
- changelog-format
|
||||||
|
|
||||||
|
- name: publish-gitea
|
||||||
|
image: plugins/gitea-release
|
||||||
|
settings:
|
||||||
|
api_key:
|
||||||
|
from_secret: gitea_token
|
||||||
|
base_url: https://gitea.rknet.org
|
||||||
|
note: CHANGELOG.md
|
||||||
|
overwrite: true
|
||||||
|
title: ${DRONE_TAG}
|
||||||
|
when:
|
||||||
|
ref:
|
||||||
|
- refs/tags/**
|
||||||
|
depends_on:
|
||||||
|
- publish-dockerhub
|
||||||
|
- publish-quay
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/master
|
- refs/heads/main
|
||||||
- refs/pull/**
|
- refs/pull/**
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- test
|
- test
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
@ -128,63 +137,61 @@ platform:
|
|||||||
arch: amd64
|
arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: pushrm-dockerhub
|
- name: pushrm-dockerhub
|
||||||
pull: always
|
image: chko/docker-pushrm:1
|
||||||
image: chko/docker-pushrm:1
|
environment:
|
||||||
environment:
|
DOCKER_PASS:
|
||||||
DOCKER_PASS:
|
from_secret: docker_password
|
||||||
from_secret: docker_password
|
DOCKER_USER:
|
||||||
DOCKER_USER:
|
from_secret: docker_username
|
||||||
from_secret: docker_username
|
PUSHRM_FILE: README.md
|
||||||
PUSHRM_FILE: README.md
|
PUSHRM_SHORT: Custom image for lighthouse-ci
|
||||||
PUSHRM_SHORT: Custom image for lighthouse-ci
|
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
|
||||||
PUSHRM_TARGET: thegeeklab/${DRONE_REPO_NAME}
|
when:
|
||||||
when:
|
status:
|
||||||
status:
|
- success
|
||||||
- success
|
|
||||||
|
|
||||||
- name: pushrm-quay
|
- name: pushrm-quay
|
||||||
pull: always
|
image: chko/docker-pushrm:1
|
||||||
image: chko/docker-pushrm:1
|
environment:
|
||||||
environment:
|
APIKEY__QUAY_IO:
|
||||||
APIKEY__QUAY_IO:
|
from_secret: quay_token
|
||||||
from_secret: quay_token
|
PUSHRM_FILE: README.md
|
||||||
PUSHRM_FILE: README.md
|
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
||||||
PUSHRM_TARGET: quay.io/thegeeklab/${DRONE_REPO_NAME}
|
when:
|
||||||
when:
|
status:
|
||||||
status:
|
- success
|
||||||
- success
|
|
||||||
|
|
||||||
- name: matrix
|
- name: matrix
|
||||||
image: plugins/matrix
|
image: thegeeklab/drone-matrix
|
||||||
settings:
|
settings:
|
||||||
homeserver:
|
homeserver:
|
||||||
from_secret: matrix_homeserver
|
from_secret: matrix_homeserver
|
||||||
password:
|
password:
|
||||||
from_secret: matrix_password
|
from_secret: matrix_password
|
||||||
roomid:
|
roomid:
|
||||||
from_secret: matrix_roomid
|
from_secret: matrix_roomid
|
||||||
template: "Status: **{{ build.status }}**<br/> Build: [{{ repo.Owner }}/{{ repo.Name }}]({{ build.link }}) ({{ build.branch }}) by {{ build.author }}<br/> Message: {{ build.message }}"
|
template: "Status: **{{ .Build.Status }}**<br/> Build: [{{ .Repo.Owner }}/{{ .Repo.Name }}]({{ .Build.Link }}){{ if .Build.Branch }} ({{ .Build.Branch }}){{ end }} by {{ .Commit.Author }}<br/> Message: {{ .Commit.Message.Title }}"
|
||||||
username:
|
username:
|
||||||
from_secret: matrix_username
|
from_secret: matrix_username
|
||||||
when:
|
when:
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
ref:
|
ref:
|
||||||
- refs/heads/master
|
- refs/heads/main
|
||||||
- refs/tags/**
|
- refs/tags/**
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
- failure
|
- failure
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-container
|
- build-container
|
||||||
|
|
||||||
---
|
---
|
||||||
kind: signature
|
kind: signature
|
||||||
hmac: 6947fd2349103a32a9fe46e79d61751515b6c1b6e5b6ee4c45bd9421a25ae0f7
|
hmac: 40c971d184c9d8e7749c0109daf8093e7d90caae2ed7fc42117901410e07212c
|
||||||
|
|
||||||
...
|
...
|
||||||
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
|||||||
|
CHANGELOG.md
|
@ -1 +1,3 @@
|
|||||||
.drone.yml
|
.drone.yml
|
||||||
|
*.tpl.md
|
||||||
|
LICENSE
|
||||||
|
@ -1,3 +0,0 @@
|
|||||||
- ENHANCEMENT
|
|
||||||
- Update dependency mikefarah/yq to v4.1.0
|
|
||||||
- Use `yq` native alternative syntax
|
|
31
Dockerfile
31
Dockerfile
@ -1,5 +1,4 @@
|
|||||||
FROM node:10-alpine
|
FROM node:lts-bullseye-slim@sha256:009f925f64bfbf87c11a19809c4e6068aa2bb167083179990f52b197805b9dde
|
||||||
# due to https://github.com/http-party/http-server/issues/537
|
|
||||||
|
|
||||||
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
LABEL maintainer="Robert Kaussow <mail@thegeeklab.de>"
|
||||||
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
LABEL org.opencontainers.image.authors="Robert Kaussow <mail@thegeeklab.de>"
|
||||||
@ -12,9 +11,9 @@ ARG BUILD_VERSION
|
|||||||
ARG YQ_VERSION
|
ARG YQ_VERSION
|
||||||
|
|
||||||
# renovate: datasource=npm depName=@lhci/cli
|
# renovate: datasource=npm depName=@lhci/cli
|
||||||
ENV LHCI_VERSION="${BUILD_VERSION:-0.6.1}"
|
ENV LHCI_VERSION="${BUILD_VERSION:-0.12.0}"
|
||||||
# renovate: datasource=github-releases depName=mikefarah/yq
|
# renovate: datasource=github-releases depName=mikefarah/yq
|
||||||
ENV YQ_VERSION="${YQ_VERSION:-v4.1.0}"
|
ENV YQ_VERSION="${YQ_VERSION:-v4.34.1}"
|
||||||
|
|
||||||
ENV LHCI_BASE_DIR=/drone/src \
|
ENV LHCI_BASE_DIR=/drone/src \
|
||||||
FORCE_COLOR=true \
|
FORCE_COLOR=true \
|
||||||
@ -23,25 +22,17 @@ ENV LHCI_BASE_DIR=/drone/src \
|
|||||||
|
|
||||||
ADD overlay/ /
|
ADD overlay/ /
|
||||||
|
|
||||||
RUN apk --update add --virtual .build-deps curl && \
|
RUN apt-get update && apt-get install -y git curl wget gnupg jq bash bc && \
|
||||||
echo @edge http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories && \
|
curl -SsfL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" && \
|
||||||
echo @edge http://dl-cdn.alpinelinux.org/alpine/edge/community >> /etc/apk/repositories && \
|
|
||||||
apk update && \
|
|
||||||
apk add --update --no-cache git chromium@edge jq && \
|
|
||||||
curl -SsL -o /usr/local/bin/yq "https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/yq_linux_amd64" && \
|
|
||||||
chmod 755 /usr/local/bin/yq && \
|
chmod 755 /usr/local/bin/yq && \
|
||||||
|
wget -qO - "https://dl-ssl.google.com/linux/linux_signing_key.pub" | apt-key add - && \
|
||||||
|
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | tee "/etc/apt/sources.list.d/google.list" && \
|
||||||
|
apt-get update && apt-get install --no-install-recommends -y google-chrome-stable && \
|
||||||
LHCI_VERSION="${LHCI_VERSION##v}" && \
|
LHCI_VERSION="${LHCI_VERSION##v}" && \
|
||||||
LHCI_MAJOR="${LHCI_VERSION%%.*}" && \
|
echo "Installing lhci version '$LHCI_VERSION' ..." && \
|
||||||
if [ -z "${LHCI_MAJOR//[0-9]}" ] && [ -n "$LHCI_MAJOR" ]; then \
|
npm install -g @lhci/cli@"$LHCI_VERSION"; \
|
||||||
echo "Installing lhci version '$LHCI_VERSION' ..." && \
|
|
||||||
npm install -g @lhci/cli@"$LHCI_VERSION"; \
|
|
||||||
else \
|
|
||||||
echo "Installing latest lhci ..." && \
|
|
||||||
npm install -g @lhci/cli; \
|
|
||||||
fi && \
|
|
||||||
npm install -g lighthouse && \
|
npm install -g lighthouse && \
|
||||||
apk del .build-deps && \
|
rm -rf /var/lib/apt/lists/* && \
|
||||||
rm -rf /var/cache/apk/* && \
|
|
||||||
rm -rf /tmp/* && \
|
rm -rf /tmp/* && \
|
||||||
rm -rf /root/.cache/
|
rm -rf /root/.cache/
|
||||||
|
|
||||||
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2022 Robert Kaussow <mail@thegeeklab.de>
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is furnished
|
||||||
|
to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice (including the next
|
||||||
|
paragraph) shall be included in all copies or substantial portions of the
|
||||||
|
Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||||
|
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
|
||||||
|
OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||||
|
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF
|
||||||
|
OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@ -6,7 +6,7 @@ Custom image for lighthouse-ci
|
|||||||
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/lhci)
|
[![Docker Hub](https://img.shields.io/badge/dockerhub-latest-blue.svg?logo=docker&logoColor=white)](https://hub.docker.com/r/thegeeklab/lhci)
|
||||||
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/lhci)
|
[![Quay.io](https://img.shields.io/badge/quay-latest-blue.svg?logo=docker&logoColor=white)](https://quay.io/repository/thegeeklab/lhci)
|
||||||
[![Source: Gitea](https://img.shields.io/badge/source-gitea-blue.svg?logo=gitea&logoColor=white)](https://gitea.rknet.org/docker/lhci)
|
[![Source: Gitea](https://img.shields.io/badge/source-gitea-blue.svg?logo=gitea&logoColor=white)](https://gitea.rknet.org/docker/lhci)
|
||||||
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/docker/lhci/src/branch/master/LICENSE)
|
[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://gitea.rknet.org/docker/lhci/src/branch/main/LICENSE)
|
||||||
|
|
||||||
Custom wrapper Docker image for [lighthouse-ci](https://github.com/GoogleChrome/lighthouse-ci).
|
Custom wrapper Docker image for [lighthouse-ci](https://github.com/GoogleChrome/lighthouse-ci).
|
||||||
|
|
||||||
@ -88,4 +88,4 @@ docker build -t lhci:latest .
|
|||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
This project is licensed under the MIT License - see the [LICENSE](https://gitea.rknet.org/docker/lhci/src/branch/master/LICENSE) file for details.
|
This project is licensed under the MIT License - see the [LICENSE](https://gitea.rknet.org/docker/lhci/src/branch/main/LICENSE) file for details.
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
CONFIG="${LHCI_BASE_DIR%/}/.lighthouserc.yml"
|
CONFIG="${LHCI_BASE_DIR%/}/.lighthouserc.yml"
|
||||||
@ -10,16 +10,16 @@ if [ -f "$CONFIG" ] && echo "$OUT" | grep -q "Done running Lighthouse"; then
|
|||||||
UPLOAD_TARGET=$(yq e '.ci.upload.target // ""' "${CONFIG}")
|
UPLOAD_TARGET=$(yq e '.ci.upload.target // ""' "${CONFIG}")
|
||||||
UPLOAD_OUTPUT_DIR=$(yq e '.ci.upload.outputDir // ""' "${CONFIG}")
|
UPLOAD_OUTPUT_DIR=$(yq e '.ci.upload.outputDir // ""' "${CONFIG}")
|
||||||
|
|
||||||
if [ "${UPLOAD_TARGET}" = "filesystem" ] && [ -n "${UPLOAD_OUTPUT_DIR}" ] ; then
|
if [ "${UPLOAD_TARGET}" = "filesystem" ] && [ -n "${UPLOAD_OUTPUT_DIR}" ]; then
|
||||||
MANIFEST=${UPLOAD_OUTPUT_DIR%/}/manifest.json
|
MANIFEST=${UPLOAD_OUTPUT_DIR%/}/manifest.json
|
||||||
DIST="${LHCI_BASE_DIR%/}/${UPLOAD_OUTPUT_DIR%/}/dist"
|
DIST="${LHCI_BASE_DIR%/}/${UPLOAD_OUTPUT_DIR%/}/dist"
|
||||||
mkdir -p "${DIST}"
|
mkdir -p "${DIST}"
|
||||||
|
|
||||||
if [ -f "$CONFIG" ]; then
|
if [ -f "$CONFIG" ]; then
|
||||||
cp /templates/summary.md "${DIST}/summary.md"
|
cp /templates/summary.md "${DIST}/summary.md"
|
||||||
|
|
||||||
printf "\nPost-process report files...\n"
|
printf "\nPost-process report files...\n"
|
||||||
for ITEM in $(jq -r '.[] | select( .isRepresentativeRun == true ) | @base64' < "${MANIFEST}"); do
|
for ITEM in $(jq -r '.[] | select( .isRepresentativeRun == true ) | @base64' <"${MANIFEST}"); do
|
||||||
JSON=$(echo "${ITEM}" | base64 -d)
|
JSON=$(echo "${ITEM}" | base64 -d)
|
||||||
FILE_DATE=$(date '+%Y%m%d%H%M')
|
FILE_DATE=$(date '+%Y%m%d%H%M')
|
||||||
|
|
||||||
@ -38,7 +38,7 @@ if [ -f "$CONFIG" ] && echo "$OUT" | grep -q "Done running Lighthouse"; then
|
|||||||
cp "${FILENAME}" "${DIST}/${FILENAME_NEW}.html"
|
cp "${FILENAME}" "${DIST}/${FILENAME_NEW}.html"
|
||||||
echo "Report for ${URL} will be uploaded to ${DOWNLOAD}"
|
echo "Report for ${URL} will be uploaded to ${DOWNLOAD}"
|
||||||
|
|
||||||
echo "| [Link]("${DOWNLOAD}") | \`${URL}\` | $(echo "scale=0;($PERF*100)/1" | bc) % | $(echo "scale=0;($ACCESS*100)/1" | bc) % | $(echo "scale=0;($PRACTICE*100)/1" | bc) % | $(echo "scale=0;($SEO*100)/1" | bc) % | $(echo "scale=0;($PWA*100)/1" | bc) % |" >> "${DIST}/summary.md"
|
echo "| [Link](${DOWNLOAD}) | \`${URL}\` | $(echo "scale=0;($PERF*100)/1" | bc) % | $(echo "scale=0;($ACCESS*100)/1" | bc) % | $(echo "scale=0;($PRACTICE*100)/1" | bc) % | $(echo "scale=0;($SEO*100)/1" | bc) % | $(echo "scale=0;($PWA*100)/1" | bc) % |" >>"${DIST}/summary.md"
|
||||||
done
|
done
|
||||||
else
|
else
|
||||||
printf "\nPost-processing skipped. Manifest not found!\n"
|
printf "\nPost-processing skipped. Manifest not found!\n"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/usr/bin/env sh
|
#!/usr/bin/env bash
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
|
|
||||||
exec /usr/local/bin/lhci "$@"
|
exec /usr/local/bin/lhci "$@"
|
||||||
|
@ -1,16 +1,4 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"extends": ["config:base"],
|
"extends": ["github>thegeeklab/renovate-presets:docker"]
|
||||||
"ignorePresets": [":prHourlyLimit2"],
|
|
||||||
"regexManagers": [
|
|
||||||
{
|
|
||||||
"fileMatch": ["^Dockerfile$"],
|
|
||||||
"matchStrings": [
|
|
||||||
"# renovate: datasource=(?<datasource>\\S+) depName=(?<depName>\\S+)( versioning=(?<versioning>.*?))?\\nENV .*?_VERSION=\"\\${.*:-(?<currentValue>.*)}\"\\s"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"droneci": {
|
|
||||||
"enabled": false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user