Skip to content
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

chore(deps): update ghcr.io/hargata/lubelogger docker tag to v1.4.0 #33

Merged
merged 2 commits into from
Nov 17, 2024
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
36 changes: 36 additions & 0 deletions .github/workflows/command.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Trigger CI on Comment

on:
issue_comment:
types:
- created

jobs:
process-comment:
if: startsWith(github.event.comment.body, '/ci ')
runs-on: ubuntu-latest

permissions:
contents: write
issues: write
pull-requests: write

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: fregante/setup-git-user@v2
- id: extract_info
run: |
./hack/comment.sh "${{ github.event.comment.body }}" "${GITHUB_ENV}"
- run: |
PR_NUMBER=${{ github.event.issue.number }}
BRANCH_NAME=$(gh pr view $PR_NUMBER --json headRefName --jq '.headRefName')
git fetch origin $BRANCH_NAME
git checkout $BRANCH_NAME
- run: |
make ci CHART=anza-labs/${{ env.chart_name }} VERSION=${{ env.chart_version }}
- run: |
git add .
git commit -m "fix: generated chart ${{ env.chart_name }} version ${{ env.chart_version }}" || echo "No changes to commit"
git push origin HEAD
27 changes: 21 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ SHELL = /usr/bin/env bash -o pipefail
.SHELLFLAGS = -ec

.PHONY: all
all: backfill-app-version generate-schemas generate-docs
all: backfill-all-app-version generate-schemas generate-docs

##@ General

Expand All @@ -34,24 +34,39 @@ help: ## Display this help.

##@ Development

.PHONY: backfill-app-versions
backfill-app-version: yq
.PHONY: ci
ci: _ci _generate-schema _generate-docs

.PHONY: _ci
_ci:
$(MAKE) _backfill-app-version CHART=${CHART}
$(MAKE) _set-chart-version VERSION=${VERSION}

.PHONY: backfill-all-app-versions
backfill-all-app-versions: yq
for dir in anza-labs/*; do $(MAKE) _backfill-app-version CHART="$$dir"; done

.PHONY: _backfill-app-version
_backfill-app-version:
_backfill-app-version: yq
cd ${CHART}; ./.backfill.sh $(YQ)

.PHONY: _set-chart-version
_set-chart-version: yq
cd ${CHART}; $(YQ) ".version = \"${VERSION}\"" './Chart.yaml' -i

.PHONY: generate-docs
generate-docs: helm-docs ## Run kube-linter on Kubernetes manifests.
$(HELM_DOCS) --badge-style=flat
for dir in anza-labs/*; do $(MAKE) _ggenerate-docs CHART="$$dir"; done

_generate-docs: helm-docs
cd ${CHART}; $(HELM_DOCS) --badge-style=flat

.PHONY: generate-schemas
generate-schemas: helm-values-schema-json ## Run kube-linter on Kubernetes manifests.
for dir in anza-labs/*; do $(MAKE) _generate-schema CHART="$$dir"; done

.PHONY: _generate-schema
_generate-schema:
_generate-schema: helm-values-schema-json
$(HELM_VALUES_SCHEMA_JSON) \
-draft=7 \
-indent=2 \
Expand Down
4 changes: 2 additions & 2 deletions anza-labs/lubelogger/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: lubelogger
description: LubeLogger is a web-based vehicle maintenance and fuel mileage tracker
type: application
version: 0.4.8
appVersion: "v1.3.9"
version: 0.4.9
appVersion: "v1.4.0"
maintainers:
- name: Mateusz Urbanek
email: matueusz.urbanek.98@gmail.com
Expand Down
4 changes: 2 additions & 2 deletions anza-labs/lubelogger/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# lubelogger

![Version: 0.4.8](https://img.shields.io/badge/Version-0.4.8-informational?style=flat) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) ![AppVersion: v1.3.9](https://img.shields.io/badge/AppVersion-v1.3.9-informational?style=flat)
![Version: 0.4.9](https://img.shields.io/badge/Version-0.4.9-informational?style=flat) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat) ![AppVersion: v1.4.0](https://img.shields.io/badge/AppVersion-v1.4.0-informational?style=flat)

LubeLogger is a web-based vehicle maintenance and fuel mileage tracker

Expand Down Expand Up @@ -55,7 +55,7 @@ LubeLogger is a web-based vehicle maintenance and fuel mileage tracker
| fullnameOverride | string | `""` | Override for the full name. |
| image.pullPolicy | string | `"IfNotPresent"` | Image pull policy. |
| image.repository | string | `"ghcr.io/hargata/lubelogger"` | Registry and repository for the lubelogger image. |
| image.tag | string | `"v1.3.9"` | Tag for the image. |
| image.tag | string | `"v1.4.0"` | Tag for the image. |
| imagePullSecrets | list | `[]` | Secrets for pulling images. |
| ingress.annotations | object | `{}` | Annotations to add to the ingress. |
| ingress.className | string | `""` | Ingress class name. |
Expand Down
2 changes: 1 addition & 1 deletion anza-labs/lubelogger/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ image:
# -- Registry and repository for the lubelogger image.
repository: ghcr.io/hargata/lubelogger
# -- Tag for the image.
tag: "v1.3.9"
tag: "v1.4.0"
# -- Image pull policy.
pullPolicy: IfNotPresent

Expand Down
14 changes: 14 additions & 0 deletions hack/comment.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash

set -eu

COMMENT="${1}"
GITHUB_ENV="${2}"

if [[ "$COMMENT" =~ ^/ci[[:space:]]+([a-zA-Z0-9_-]+)[[:space:]]+([0-9]+\.[0-9]+\.[0-9]+)$ ]]; then
echo "chart_name=${BASH_REMATCH[1]}" >> $GITHUB_ENV
echo "chart_version=${BASH_REMATCH[2]}" >> $GITHUB_ENV
else
echo "Comment format invalid. Expected '/ci <chart-name> <chart-version>'." >&2
exit 1
fi
Loading