cli: remove leftover trace log from #3324 that always renders a JSON … #79
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| --- | |
| name: Build (main) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - "*.nix" | |
| - "go.*" | |
| - "**/*.go" | |
| - ".github/workflows/container-main.yml" | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.sha }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: nix develop --fallback --command bash -e {0} | |
| jobs: | |
| container: | |
| if: github.repository == 'juanfont/headscale' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| packages: write | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Login to GHCR | |
| uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - uses: NixOS/nix-installer-action@6b8548fe06acfb0155a50ab5d561accb215764cc # main | |
| - uses: Mic92/hestia@fb239a2f72d4b6e26eec5425f289dea23b27a527 # v2.0.0 | |
| - name: Set commit timestamp | |
| run: echo "SOURCE_DATE_EPOCH=$(git log -1 --format=%ct)" >> $GITHUB_ENV | |
| - name: Build and push to GHCR | |
| env: | |
| KO_DOCKER_REPO: ghcr.io/juanfont/headscale | |
| KO_DEFAULTBASEIMAGE: gcr.io/distroless/base-debian13 | |
| CGO_ENABLED: "0" | |
| run: | | |
| ko build \ | |
| --bare \ | |
| --platform=linux/amd64,linux/arm64 \ | |
| --tags=main-${GITHUB_SHA::7},development \ | |
| ./cmd/headscale | |
| - name: Push to Docker Hub | |
| env: | |
| KO_DOCKER_REPO: headscale/headscale | |
| KO_DEFAULTBASEIMAGE: gcr.io/distroless/base-debian13 | |
| CGO_ENABLED: "0" | |
| run: | | |
| ko build \ | |
| --bare \ | |
| --platform=linux/amd64,linux/arm64 \ | |
| --tags=main-${GITHUB_SHA::7},development \ | |
| ./cmd/headscale | |
| binaries: | |
| if: github.repository == 'juanfont/headscale' | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| include: | |
| - goos: linux | |
| goarch: amd64 | |
| - goos: linux | |
| goarch: arm64 | |
| - goos: darwin | |
| goarch: amd64 | |
| - goos: darwin | |
| goarch: arm64 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: NixOS/nix-installer-action@6b8548fe06acfb0155a50ab5d561accb215764cc # main | |
| - uses: Mic92/hestia@fb239a2f72d4b6e26eec5425f289dea23b27a527 # v2.0.0 | |
| - name: Build binary | |
| env: | |
| CGO_ENABLED: "0" | |
| GOOS: ${{ matrix.goos }} | |
| GOARCH: ${{ matrix.goarch }} | |
| run: go build -o headscale ./cmd/headscale | |
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: headscale-${{ matrix.goos }}-${{ matrix.goarch }} | |
| path: headscale |