diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml index 970af80..d3a1766 100644 --- a/.gitea/workflows/deploy.yaml +++ b/.gitea/workflows/deploy.yaml @@ -46,7 +46,7 @@ on: type: string default: "" secrets: - token: + TOKEN: required: true jobs: @@ -55,14 +55,14 @@ jobs: steps: - name: Install yq run: | - wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 + wget -qO /usr/local/bin/yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_arm64 chmod +x /usr/local/bin/yq - name: Checkout ArgoCD repo - uses: actions/checkout@v6 + uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: repository: ${{ inputs.argocd-repo }} - token: ${{ secrets.token }} + token: ${{ secrets.TOKEN }} github-server-url: ${{ inputs.server-url }} - name: Update Helm chart version diff --git a/.gitea/workflows/homelab-deploy.yaml b/.gitea/workflows/homelab-deploy.yaml new file mode 100644 index 0000000..edd5af5 --- /dev/null +++ b/.gitea/workflows/homelab-deploy.yaml @@ -0,0 +1,58 @@ +name: Deploy on argocd repo + +on: + workflow_call: + inputs: + file-path: + description: Path to the values/manifest file to update + required: true + type: string + update-helm: + description: Whether to update the Helm chart version + required: false + type: boolean + default: false + update-image: + description: Whether to update the image tag + required: false + type: boolean + default: false + helm-path: + description: yq path to the Helm version field + required: false + type: string + default: .spec.source.targetRevision + helm-version: + description: Helm chart version to set + required: false + type: string + default: "" + image-path: + description: yq path to the image tag field + required: false + type: string + default: "" + image-version: + description: Image tag to set + required: false + type: string + default: "" + secrets: + TOKEN: + required: true + +jobs: + deploy: + uses: https://gitea.ldpt.fr/actions/argocd-deploy/.gitea/workflows/deploy.yaml@main + with: + server-url: https://github.com + argocd-repo: lucasdpt/k8s-homelab-gitops + file-path: ${{ inputs.file-path }} + update-helm: ${{ inputs.update-helm }} + update-image: ${{ inputs.update-image }} + helm-path: ${{ inputs.helm-path }} + helm-version: ${{ inputs.helm-version }} + image-path: ${{ inputs.image-path }} + image-version: ${{ inputs.image-version }} + secrets: + TOKEN: ${{ secrets.TOKEN }} \ No newline at end of file diff --git a/.gitea/workflows/release.yaml b/.gitea/workflows/release.yaml new file mode 100644 index 0000000..03d4161 --- /dev/null +++ b/.gitea/workflows/release.yaml @@ -0,0 +1,16 @@ +name: semantic-release + +on: + push: + branches: + - master + - main + +permissions: + contents: write + issues: write + pull-requests: write + +jobs: + release: + uses: https://gitea.ldpt.fr/actions/semantic-release/.github/workflows/semantic-release.yml@v2.3.0 \ No newline at end of file