-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
d185019
commit 662604d
Showing
7 changed files
with
100 additions
and
0 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 |
---|---|---|
|
@@ -18,6 +18,9 @@ jobs: | |
- name: 'Checkout code' | ||
uses: actions/checkout@v4 | ||
|
||
- name: 'Install Helm' | ||
uses: azure/[email protected] | ||
|
||
- name: 'Set image tag and name' | ||
id: tag | ||
run: | | ||
|
@@ -34,6 +37,7 @@ jobs: | |
- name: 'Login to Docker Hub' | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: registry-1.docker.io | ||
username: ${{ secrets.REGISTRY_USER }} | ||
password: ${{ secrets.REGISTRY_PASSWORD }} | ||
|
||
|
@@ -76,6 +80,12 @@ jobs: | |
cache-to: type=registry,ref=${{ steps.tag.outputs.image_name }}-fz-fw:buildcache,mode=max | ||
context: flipperzero-firmware | ||
|
||
- name: 'Push helm chart' | ||
if: ${{ github.event_name != 'pull_request' }} | ||
run: | | ||
helm package helm --version ${IMAGE_TAG}; | ||
helm push github-actions-runner-${IMAGE_TAG}.tgz oci://registry-1.docker.io/flipperdevices; | ||
- name: 'Trigger k8s to use new image android: prod' | ||
if: ${{ (github.event_name != 'pull_request') | ||
&& (steps.tag.outputs.image_tag != '0.0.0') | ||
|
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,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,5 @@ | ||
apiVersion: v2 | ||
name: github-actions-runner | ||
description: Github Action runners deployment | ||
type: application | ||
version: 0.1.0 |
Binary file not shown.
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,18 @@ | ||
apiVersion: actions.summerwind.dev/v1alpha1 | ||
kind: HorizontalRunnerAutoscaler | ||
metadata: | ||
namespace: {{ .Release.Namespace }} | ||
name: github-runner-deployment-autoscaler | ||
spec: | ||
scaleDownDelaySecondsAfterScaleOut: 180 | ||
scaleTargetRef: | ||
kind: RunnerDeployment | ||
name: github-runner-deployment | ||
minReplicas: {{ .Values.replicasCount }} | ||
maxReplicas: {{ .Values.replicasCount }} | ||
metrics: | ||
- type: PercentageRunnersBusy | ||
scaleUpThreshold: '0.75' | ||
scaleDownThreshold: '0.25' | ||
scaleUpFactor: '2' | ||
scaleDownFactor: '0.5' |
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,44 @@ | ||
apiVersion: actions.summerwind.dev/v1alpha1 | ||
kind: RunnerDeployment | ||
metadata: | ||
name: github-runner-deployment | ||
namespace: {{ .Release.Namespace }} | ||
|
||
spec: | ||
template: | ||
spec: | ||
image: {{ .Values.repository }}:{{ .Values.tag }} | ||
dockerdWithinRunnerContainer: {{ .Values.dockerInDocker }} | ||
organization: {{ .Values.organization }} | ||
labels: | ||
{{- toYaml .Values.labels | nindent 8 }} | ||
group: {{ .Values.runnerGroup }} | ||
{{- if .Values.volumeMounts }} | ||
{{- range .Values.volumeMounts }} | ||
volumeMounts: | ||
- mountPath: {{ .mountPath }} | ||
name: {{ .name }} | ||
{{- end }} | ||
{{- range .Values.volumeMounts }} | ||
volumes: | ||
- name: {{ .name }} | ||
hostPath: | ||
path: {{ .hostPath }} | ||
type: DirectoryOrCreate | ||
{{- end }} | ||
{{- end }} | ||
dockerEnabled: false | ||
{{- if .Values.serviceAccountName }} | ||
serviceAccountName: {{ .Values.serviceAccountName }} | ||
{{- else }} | ||
serviceAccountName: default | ||
{{- end }} | ||
{{- if .Values.maxRunnersPerNode }} | ||
topologySpreadConstraints: | ||
- maxSkew: {{ .Values.maxRunnersPerNode }} | ||
topologyKey: kubernetes.io/hostname | ||
whenUnsatisfiable: DoNotSchedule | ||
labelSelector: | ||
matchLabels: | ||
runner-deployment-name: github-runner-deployment | ||
{{- end }} |
Empty file.