forked from Gitea/helm-actions
Compare commits
8 Commits
add-dind-d
...
bf56769a35
Author | SHA1 | Date | |
---|---|---|---|
bf56769a35 | |||
![]() |
a60844fc96 | ||
![]() |
6417e21627 | ||
![]() |
4be7971caa | ||
![]() |
2457ccae5c | ||
![]() |
1e51423d3a | ||
b8058bee05 | |||
![]() |
6d82ade984 |
@@ -8,12 +8,12 @@ on:
|
||||
jobs:
|
||||
changelog:
|
||||
runs-on: ubuntu-latest
|
||||
container: docker.io/thegeeklab/git-sv:1.0.12
|
||||
container: docker.io/thegeeklab/git-sv:2.0.5
|
||||
steps:
|
||||
- name: install tools
|
||||
run: |
|
||||
apk add -q --update --no-cache nodejs curl jq sed
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Generate upcoming changelog
|
||||
|
@@ -13,7 +13,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
container: commitlint/commitlint:19.7.1
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: check PR title
|
||||
run: |
|
||||
echo "${{ gitea.event.pull_request.title }}" | commitlint --config .commitlintrc.json
|
||||
|
@@ -13,7 +13,7 @@ jobs:
|
||||
generate-chart-publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: install tools
|
||||
run: |
|
||||
apt update -y
|
||||
@@ -59,7 +59,7 @@ jobs:
|
||||
helm registry logout registry-1.docker.io
|
||||
|
||||
- name: aws credential configure
|
||||
uses: https://github.com/aws-actions/configure-aws-credentials@v4
|
||||
uses: https://github.com/aws-actions/configure-aws-credentials@v5
|
||||
with:
|
||||
aws-access-key-id: ${{ secrets.AWS_KEY_ID }}
|
||||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
|
@@ -9,6 +9,6 @@ jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4.2.2
|
||||
- uses: actions/checkout@v5
|
||||
- run: apt update --yes && apt install --yes shellcheck
|
||||
- run: find . -type f -name "*.sh" -exec shellcheck -a {} \;
|
||||
|
@@ -25,7 +25,7 @@ jobs:
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 10
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/checkout@v5
|
||||
- name: install chart dependencies
|
||||
run: helm dependency build
|
||||
- name: lint
|
||||
|
@@ -6,6 +6,10 @@ The parameters which can be used to customize the deployment are described below
|
||||
|
||||
If you want to propose a new feature or mechanism, submit an [issue here](https://gitea.com/gitea/helm-actions/issues).
|
||||
|
||||
## Docs
|
||||
|
||||
[Docs](./docs/README.md)
|
||||
|
||||
## Rootless Defaults
|
||||
|
||||
If `.Values.image.rootless: true`, then the following will occur. In case you use `.Values.image.fullOverride`, check that this works in your image:
|
||||
@@ -30,7 +34,7 @@ If `.Values.image.rootless: true`, then the following will occur. In case you us
|
||||
| `statefulset.affinity` | Affinity for the statefulset | `{}` |
|
||||
| `statefulset.extraVolumes` | Extra volumes for the statefulset | `[]` |
|
||||
| `statefulset.actRunner.repository` | The Gitea act runner image | `gitea/act_runner` |
|
||||
| `statefulset.actRunner.tag` | The Gitea act runner tag | `0.2.12` |
|
||||
| `statefulset.actRunner.tag` | The Gitea act runner tag | `0.2.13` |
|
||||
| `statefulset.actRunner.pullPolicy` | The Gitea act runner pullPolicy | `IfNotPresent` |
|
||||
| `statefulset.actRunner.extraVolumeMounts` | Allows mounting extra volumes in the act runner container | `[]` |
|
||||
| `statefulset.actRunner.config` | Act runner custom configuration. See [Act Runner documentation](https://docs.gitea.com/usage/actions/act-runner#configuration) for details. | `Too complex. See values.yaml` |
|
||||
|
3
docs/README.md
Normal file
3
docs/README.md
Normal file
@@ -0,0 +1,3 @@
|
||||
# Gitea Actions Helm Chart Docs
|
||||
|
||||
- [Share dind with job container](share-dind-with-job-container.md)
|
36
docs/share-dind-with-job-container.md
Normal file
36
docs/share-dind-with-job-container.md
Normal file
@@ -0,0 +1,36 @@
|
||||
# Share dind with job container
|
||||
|
||||
You can weaken isolation and allow jobs to call docker commands.
|
||||
|
||||
## Limitations
|
||||
|
||||
- Docker bind mounts like `-v /path/on/self/container:/path/to/new/container` do not work, because they are going to mount the path from the dind container
|
||||
- Docker port expose to local host `-e 80:8080` is not going to work
|
||||
|
||||
## Example Values
|
||||
|
||||
```yaml
|
||||
enabled: true
|
||||
statefulset:
|
||||
actRunner:
|
||||
# See full example here: https://gitea.com/gitea/act_runner/src/branch/main/internal/pkg/config/config.example.yaml
|
||||
config: |
|
||||
log:
|
||||
level: debug
|
||||
cache:
|
||||
enabled: false
|
||||
container:
|
||||
valid_volumes:
|
||||
- /var/run/docker.sock
|
||||
options: -v /var/run/docker.sock:/var/run/docker.sock
|
||||
|
||||
## Specify an existing token secret
|
||||
##
|
||||
existingSecret: "runner-token2"
|
||||
existingSecretKey: "token"
|
||||
|
||||
## Specify the root URL of the Gitea instance
|
||||
giteaRootURL: "http://192.168.1.2:3000"
|
||||
```
|
||||
|
||||
Now you can run docker commands inside your jobs.
|
@@ -9,19 +9,19 @@
|
||||
labels: [
|
||||
'kind/dependency',
|
||||
],
|
||||
"digest": {
|
||||
"automerge": true
|
||||
digest: {
|
||||
automerge: true,
|
||||
},
|
||||
automergeStrategy: 'squash',
|
||||
'git-submodules': {
|
||||
'enabled': true
|
||||
enabled: true,
|
||||
},
|
||||
customManagers: [
|
||||
{
|
||||
description: 'Gitea-version of https://docs.renovatebot.com/presets-regexManagers/#regexmanagersgithubactionsversions',
|
||||
customType: 'regex',
|
||||
fileMatch: [
|
||||
'.gitea/workflows/.+\\.ya?ml$',
|
||||
managerFilePatterns: [
|
||||
'/.gitea/workflows/.+\\.ya?ml$/',
|
||||
],
|
||||
matchStrings: [
|
||||
'# renovate: datasource=(?<datasource>[a-z-.]+?) depName=(?<depName>[^\\s]+?)(?: (?:lookupName|packageName)=(?<packageName>[^\\s]+?))?(?: versioning=(?<versioning>[a-z-0-9]+?))?\\s+[A-Za-z0-9_]+?_VERSION\\s*:\\s*["\']?(?<currentValue>.+?)["\']?\\s',
|
||||
@@ -30,7 +30,9 @@
|
||||
{
|
||||
description: 'Detect helm-unittest yaml schema file',
|
||||
customType: 'regex',
|
||||
fileMatch: ['.vscode/settings\\.json$'],
|
||||
managerFilePatterns: [
|
||||
'/.vscode/settings\\.json$/',
|
||||
],
|
||||
matchStrings: [
|
||||
'https:\\/\\/raw\\.githubusercontent\\.com\\/(?<depName>[^\\s]+?)\\/(?<currentValue>v[0-9.]+?)\\/schema\\/helm-testsuite\\.json',
|
||||
],
|
||||
|
@@ -48,20 +48,6 @@ spec:
|
||||
image: "{{ .Values.statefulset.actRunner.repository }}:{{ .Values.statefulset.actRunner.tag }}"
|
||||
imagePullPolicy: {{ .Values.statefulset.actRunner.pullPolicy }}
|
||||
workingDir: /data
|
||||
command:
|
||||
# The following is a workaround for: https://gitea.com/gitea/act_runner/issues/731
|
||||
# We must add the docker-cli package for the server AND client cert verification.
|
||||
- sh
|
||||
- -c
|
||||
- |
|
||||
apk add --no-cache docker-cli
|
||||
echo "Waiting for Docker daemon..."
|
||||
until timeout 10 docker info > /dev/null; do
|
||||
echo "Failed, retrying..."
|
||||
sleep 2
|
||||
done
|
||||
echo "Docker is ready, starting act-runner..."
|
||||
exec run.sh
|
||||
env:
|
||||
- name: DOCKER_HOST
|
||||
value: tcp://127.0.0.1:2376
|
||||
@@ -126,6 +112,10 @@ spec:
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- if .Values.statefulset.dnsConfig }}
|
||||
dnsConfig:
|
||||
{{- toYaml .Values.statefulset.dnsConfig | nindent 8 }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: act-runner-config
|
||||
configMap:
|
||||
|
@@ -69,7 +69,7 @@ tests:
|
||||
name: gitea-unittests-actions-act-runner
|
||||
- equal:
|
||||
path: spec.template.metadata.annotations["checksum/config"]
|
||||
value: "7566d9c60261bf8cbff6a6936fc7aead96cec540d8c793d142a5ad4664c56ba5"
|
||||
value: "2bafbf04b3c4293c8ddf895ae3d908e14176ee54a6c724c8cf5b2a1e43c6ece7"
|
||||
- it: renders a StatefulSet http (with correct GITEA_INSTANCE_URL env from giteaRootURL)
|
||||
template: templates/statefulset.yaml
|
||||
set:
|
||||
|
@@ -10,6 +10,7 @@
|
||||
## @param statefulset.resources Act runner resources
|
||||
## @param statefulset.nodeSelector NodeSelector for the statefulset
|
||||
## @param statefulset.tolerations Tolerations for the statefulset
|
||||
## @param statefulset.dnsConfig dnsConfig for the statefulset
|
||||
## @param statefulset.affinity Affinity for the statefulset
|
||||
## @param statefulset.extraVolumes Extra volumes for the statefulset
|
||||
## @param statefulset.actRunner.repository The Gitea act runner image
|
||||
@@ -34,12 +35,13 @@ statefulset:
|
||||
resources: {}
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
dnsConfig: {}
|
||||
affinity: {}
|
||||
extraVolumes: []
|
||||
|
||||
actRunner:
|
||||
repository: gitea/act_runner
|
||||
tag: 0.2.12
|
||||
tag: 0.2.13
|
||||
pullPolicy: IfNotPresent
|
||||
extraVolumeMounts: []
|
||||
|
||||
@@ -49,6 +51,9 @@ statefulset:
|
||||
level: debug
|
||||
cache:
|
||||
enabled: false
|
||||
container:
|
||||
require_docker: true
|
||||
docker_timeout: 300s
|
||||
|
||||
dind:
|
||||
repository: docker
|
||||
|
Reference in New Issue
Block a user