Compare commits

...

11 Commits

Author SHA1 Message Date
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
d8ceb8617a [Public OK ] 2024-11-23 21:20:48 +01:00
3 changed files with 38 additions and 30 deletions

View File

@@ -9,6 +9,11 @@ on:
# Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner) # Be carefull, conflict with package-deb *.*.*, don't use more than on dot *.* (ex: 2.5-runner)
- '*-chart' - '*-chart'
env:
CHART_NAME: testchart
jobs: jobs:
build-and-push-internal: build-and-push-internal:
#! see on runner /data/.runner to add label (test => test:docker://debian:bullseye) #! see on runner /data/.runner to add label (test => test:docker://debian:bullseye)
@@ -20,12 +25,16 @@ jobs:
steps: steps:
- name: Show Information - name: Show Information
run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}" run: echo "Runner ${{ runner.os }} working on repository ${{ gitea.repository }} and on tag ${{ gitea.ref_name }}"
- name: clone & package - name: helm create chart
run: | run: helm create ${{ env.CHART_NAME }}
git clone https://${{ secrets.REGISTRY_DOCKER_PASS }}@${{ vars.REGISTRY_DOCKER }}/${{ secrets.REGISTRY_DOCKER_USER }}/${{ vars.DOCKER_IMAGE_NAME }} - name: helm package
helm package ${{ vars.DOCKER_IMAGE_NAME }} run: helm package ${{ env.CHART_NAME }}
- name: push repo
run: curl --user ${{ secrets.REGISTRY_DOCKER_USER }}:${{ secrets.REGISTRY_DOCKER_PASS }} -X POST --upload-file ./${{ env.CHART_NAME }}-0.1.0.tgz https://gitea.jingoh.fr/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 # - name: Git clone private repository
@@ -49,7 +58,7 @@ jobs:
# with: # with:
# context: . # context: .
# push: true # 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 # - 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 }}"

View File

@@ -45,8 +45,7 @@ jobs:
export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1) export VERSION=$(echo "${{ gitea.ref_name }}" | cut -d '-' -f 1)
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION
docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest docker tag ${{ env.DOCKER_IMAGE_NAME }} ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest
docker images echo "docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION"
echo "${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION"
docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:$VERSION
docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest docker push ${{ vars.REGISTRY_DOCKER }}/${{ secrets.GIT_USER_REPO }}/${{ env.DOCKER_IMAGE_NAME }}:latest

View File

@@ -4,27 +4,27 @@ FROM debian:bullseye
ENV NODE_MAJOR 16 ENV NODE_MAJOR 16
# install dependancies packages # # install dependancies packages
RUN apt-get update \ # RUN apt-get update \
&& apt-get install -y curl \ # && apt-get install -y curl \
dnsutils \ # dnsutils \
git \ # git \
ca-certificates \ # ca-certificates \
gnupg # gnupg
# NODE # # NODE
RUN install -m 0755 -d /etc/apt/keyrings # RUN install -m 0755 -d /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg # RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list # RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_$NODE_MAJOR.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
# DOCKER # # DOCKER
RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg # RUN curl -fsSL https://download.docker.com/linux/debian/gpg | gpg --dearmor -o /etc/apt/keyrings/docker.gpg
RUN chmod a+r /etc/apt/keyrings/docker.gpg # RUN chmod a+r /etc/apt/keyrings/docker.gpg
RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null # RUN echo "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | tee /etc/apt/sources.list.d/docker.list > /dev/null
RUN apt-get update \ # RUN apt-get update \
&& apt-get install -y nodejs \ # && apt-get install -y nodejs \
docker-ce \ # docker-ce \
docker-ce-cli \ # docker-ce-cli \
containerd.io \ # containerd.io \
docker-buildx-plugin # docker-buildx-plugin