state,change,mapper: report LastSeen for online peers per tailcfg protocol #7227
Workflow file for this run
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 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| concurrency: | |
| group: ${{ github.workflow }}-$${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: nix develop --fallback --command bash -e {0} | |
| jobs: | |
| build-nix: | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| with: | |
| fetch-depth: 2 | |
| - name: Get changed files | |
| id: changed-files | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| with: | |
| filters: | | |
| files: | |
| - '*.nix' | |
| - 'go.*' | |
| - '**/*.go' | |
| - 'integration_test/' | |
| - 'config-example.yaml' | |
| - uses: NixOS/nix-installer-action@6b8548fe06acfb0155a50ab5d561accb215764cc # main | |
| if: steps.changed-files.outputs.files == 'true' | |
| - uses: Mic92/hestia@fb239a2f72d4b6e26eec5425f289dea23b27a527 # v2.0.0 | |
| if: steps.changed-files.outputs.files == 'true' | |
| - name: Check vendor hash | |
| id: vendorhash | |
| if: steps.changed-files.outputs.files == 'true' | |
| run: | | |
| go run ./cmd/vendorhash check | tee check-result | |
| { | |
| grep '^expected_sri=' check-result || true | |
| grep '^actual_sri=' check-result || true | |
| } >> "$GITHUB_OUTPUT" | |
| - name: Vendor hash diverging | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| if: failure() && steps.vendorhash.outcome == 'failure' | |
| with: | |
| github-token: ${{secrets.GITHUB_TOKEN}} | |
| script: | | |
| github.rest.pulls.createReviewComment({ | |
| pull_number: context.issue.number, | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| body: 'Vendor hash in `flakehashes.json` is stale (was `${{ steps.vendorhash.outputs.expected_sri }}`, should be `${{ steps.vendorhash.outputs.actual_sri }}`). Run `go run ./cmd/vendorhash update` and commit the result.' | |
| }) | |
| - name: Run nix build | |
| if: steps.changed-files.outputs.files == 'true' | |
| run: nix build --fallback | |
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| if: steps.changed-files.outputs.files == 'true' | |
| with: | |
| name: headscale-linux | |
| path: result/bin/headscale | |
| build-cross: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| env: | |
| - "GOARCH=arm64 GOOS=linux" | |
| - "GOARCH=amd64 GOOS=linux" | |
| - "GOARCH=arm64 GOOS=darwin" | |
| - "GOARCH=amd64 GOOS=darwin" | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - uses: NixOS/nix-installer-action@6b8548fe06acfb0155a50ab5d561accb215764cc # main | |
| - uses: Mic92/hestia@fb239a2f72d4b6e26eec5425f289dea23b27a527 # v2.0.0 | |
| - name: Run go cross compile | |
| env: | |
| CGO_ENABLED: 0 | |
| run: env ${{ matrix.env }} go build -o "headscale" | |
| ./cmd/headscale | |
| - uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0 | |
| with: | |
| name: "headscale-${{ matrix.env }}" | |
| path: "headscale" |