-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add cozy update workflow * Pin cozy image tag * Bump cozy chart version * Increase cozy's memory limit
- Loading branch information
Showing
8 changed files
with
86 additions
and
21 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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
FROM alpine:3.10 | ||
|
||
WORKDIR /github/workspace | ||
|
||
ARG YQ_VERSION=v4.44.1 | ||
ARG YQ_BINARY=yq_linux_amd64 | ||
|
||
RUN apk add --no-cache wget \ | ||
&& wget https://github.com/mikefarah/yq/releases/download/${YQ_VERSION}/${YQ_BINARY} -O /usr/bin/yq \ | ||
&& chmod +x /usr/bin/yq | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ENTRYPOINT ["/entrypoint.sh"] |
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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: 'Update App Version' | ||
description: "Update a Helm chart's application version" | ||
inputs: | ||
path: | ||
description: 'Path to the chart to update' | ||
required: true | ||
tag: | ||
description: 'New tag for the docker image' | ||
required: true | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' | ||
args: | ||
- ${{ inputs.path }} | ||
- ${{ inputs.tag }} |
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#!/bin/sh | ||
|
||
values_file="$1/values.yaml" | ||
chart_file="$1/Chart.yaml" | ||
yq eval ".image.tag = \"$2\"" -i "$values_file" | ||
yq eval ".appVersion = \"$2\"" -i "$chart_file" | ||
|
||
current_version=$(yq eval '.version' "$chart_file") | ||
new_version=$(echo "$current_version" | awk -F. '{OFS="."; $3=$3+1; print}') | ||
yq eval ".version = \"$new_version\"" -i "$chart_file" |
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
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 |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Update Cozy version | ||
|
||
on: | ||
repository_dispatch: | ||
types: [cozy_update] | ||
|
||
concurrency: build-${{ github.sha }} | ||
|
||
jobs: | ||
update: | ||
if: ${{ github.event.client_payload.tag }} | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Update chart | ||
uses: ./.github/actions/update-app-version | ||
with: | ||
path: charts/cozy | ||
tag: ${{ github.event.client_payload.tag }} | ||
|
||
- name: Commit and push | ||
run: | | ||
git config --global user.name "Cozy's Valet" | ||
git config --global user.email '[email protected]' | ||
git commit -am "Update cozy version" | ||
git push |
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
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
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