name: Build and Push Image on: push: branches: - main jobs: build: runs-on: ubuntu-latest env: DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }} DEPOT_PROJECT_ID: ${{ secrets.DEPOT_PROJECT_ID }} steps: - name: Checkout uses: actions/checkout@v4 - name: Install Depot CLI run: | curl -fsSL https://depot.dev/install-cli.sh | sh echo "$HOME/.depot/bin" >> "$GITHUB_PATH" - name: Login to Gitea Container Registry run: | echo "${{ secrets.REGISTRY_TOKEN }}" | docker login git.site.latha.org -u "${{ github.actor }}" --password-stdin - name: Build and Push with Depot run: | SHORT_SHA="${GITHUB_SHA::8}" depot build \ --project "$DEPOT_PROJECT_ID" \ --push \ -t "git.site.latha.org/experiments/gitea-k3s-deployer:${SHORT_SHA}" \ -t "git.site.latha.org/experiments/gitea-k3s-deployer:latest" \ .