# Introduction This is a [Github Action](https://docs.github.com/en/actions/sharing-automations/creating-actions/creating-a-docker-container-action) using Docker, with the intention to efficiently deploy to a k3s or k8s cluster using kustomize. # How to Use ```yaml jobs: deploy_staging: steps: - name: deploy to staging id: deploy uses: https://gitea.uber5.com/Uber5-Public/gha-deploy-to-k3s@v2 with: kust_config: kustomize/overlays/testing env: K3S_YAML: ${{ secrets.K3S_YAML }} - name: Check output of previous step (kinda dummy) run: echo "The start time was ${{ steps.deploy.outputs.time }}" ``` # Open Questions - We use [kustomize](https://kustomize.io/). Is this overkill? As the complexity of deployments is not that high, usually, this may be more technical complexity than necessary. We could go back to using plain kubernetes manifests, and just have different ones for staging and prod. - Is it worth using Github Actions? We could go back to using [woodpecker](https://woodpecker-ci.org/). - Advantages Github Actions: - execution time should be faster - it's closer to the mainstream - Advantages Woodpecker: - Current deployments use woodpecker already - Simpler technology (This is debatable)