Compare commits

...

16 Commits

Author SHA1 Message Date
d040748efc [hola] 2024-11-23 22:43:50 +01:00
74c06b64b9 [...] 2024-11-23 22:42:48 +01:00
4a5e991c2e [...] 2024-11-23 22:41:46 +01:00
d2e101199b [fck] 2024-11-23 22:41:30 +01:00
6faf71e921 [fo ahead] 2024-11-23 22:39:36 +01:00
a02e13bd10 [last one motherfucker] 2024-11-23 22:37:56 +01:00
667102a66f [debilos * 2] 2024-11-23 22:28:16 +01:00
37e069f32d [debilos] 2024-11-23 22:27:25 +01:00
6436e5bb7e [debilos] 2024-11-23 22:25:12 +01:00
5af82cad53 [test helm] 2024-11-23 22:22:55 +01:00
7027cc7b99 [test helm] 2024-11-23 22:20:54 +01:00
42305deba4 [test helm] 2024-11-23 22:20:12 +01:00
6e48d8aacc [test helm] 2024-11-23 22:18:12 +01:00
a46dec16e4 [test helm] 2024-11-23 22:15:55 +01:00
f32d6ed552 [test helm] 2024-11-23 21:34:31 +01:00
63f05ad07b [Lets go again] 2024-11-23 21:28:07 +01:00

View File

@@ -9,6 +9,11 @@ on:
# Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner)
- '*-chart'
env:
GIT_REPO: testchart
jobs:
build-and-push-internal:
#! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
@@ -20,12 +25,24 @@ jobs:
steps:
- name: Show Information
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
- name: clone & package
# - name: helm create chart
# run: helm create ${{ env.GIT_REPO }}
- name: clone repo helm chart
run: git clone https://${{ secrets.REGISTRY_DOCKER_PASS }}@${{ vars.REGISTRY_DOCKER }}/${{ secrets.REGISTRY_DOCKER_USER }}/${{ env.GIT_REPO }}
- name: tag release
run: |
git clone https://${{ secrets.REGISTRY_DOCKER_PASS }}@${{ vars.REGISTRY_DOCKER }}/${{ secrets.REGISTRY_DOCKER_USER }}/${{ vars.DOCKER_IMAGE_NAME }}
helm package ${{ vars.DOCKER_IMAGE_NAME }}
export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1)
'sed -i "s/^version: .*/version: $VERSION/" /workspace/${{ secrets.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}/Chart.yaml'
- name: helm package
run: cat /workspace/${{ secrets.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}/Chart.yaml
- name: helm package
run: helm package ${{ env.GIT_REPO }}
- name: push repo
run: curl --user ${{ secrets.REGISTRY_DOCKER_USER }}:${{ secrets.REGISTRY_DOCKER_PASS }} -X POST --upload-file /workspace/${{ secrets.GIT_USER_REPO }}/gitea-runner/${{ env.GIT_REPO }}-$VERSION.tgz https://${{ vars.REGISTRY_DOCKER }}/api/packages/${{ secrets.GIT_USER_REPO }}/helm/api/charts
# helm repo add --username {username} --password {password} {repo} https://gitea.example.com/api/packages/{owner}/helm
# helm cm-push ./{chart_file}.tgz {repo}
# curl --user {username}:{password} -X POST --upload-file ./{chart_file}.tgz https://gitea.example.com/api/packages/{owner}/helm/api/charts
# - name: Git clone private repository
@@ -49,7 +66,7 @@ jobs:
# with:
# context: .
# push: true
# tags: ${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ vars.DOCKER_IMAGE_NAME }}:${{ gitea.ref_name }}
# tags: ${{ vars.REGISTRY_DOCKER }}/${{ env.CHART_NAME }}:latest,${{ vars.REGISTRY_DOCKER }}/${{ env.CHART_NAME }}:${{ gitea.ref_name }}
# - name: Output
# run: echo "Runner push on ${{ vars.REGISTRY_DOCKER }} image ${{ vars.DOCKER_IMAGE_NAME }} tag ${{ gitea.ref_name }}"
# run: echo "Runner push on ${{ vars.REGISTRY_DOCKER }} image ${{ env.CHART_NAME }} tag ${{ gitea.ref_name }}"