diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index f290dfb..44c0ee8 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -14,30 +14,43 @@ jobs: id-token: write steps: - name: Checkout code - uses: actions/checkout@v4 + uses: actions/checkout@v6 with: fetch-depth: 0 - # We need to set a cache marker to ensure that the cache is individual for each job. - - name: Add Cache Marker - run: echo "go-build" > env.txt - - name: Install Go id: install-go - uses: actions/setup-go@v5 + uses: actions/setup-go@v6 with: go-version-file: 'go.mod' - cache-dependency-path: | - go.sum - env.txt + cache: false + + - name: Cache Go mod + id: gomod + uses: actions/cache@v5 + with: + path: ~/go/pkg/mod + key: ${{ runner.os }}-go-mod-${{ hashFiles('**/go.sum') }} + restore-keys: | + ${{ runner.os }}-go-mod- + + - name: Cache Go build + uses: actions/cache@v5 + with: + path: ~/.cache/go-build + key: ${{ runner.os }}-go-build-${{ github.ref_name }} + restore-keys: | + ${{ runner.os }}-go-build- - name: Download dependencies run: go mod download - if: steps.install-go.outputs.cache-hit != 'true' + if: steps.gomod.outputs.cache-hit != 'true' - name: Run GoReleaser uses: goreleaser/goreleaser-action@v6 env: - GORELEASER_CURRENT_TAG: ${{ github.ref_name }} - DOCKER_REPOSITORY: ullaakut/cameradar - GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} \ No newline at end of file + GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }} + with: + distribution: goreleaser + version: ${{ inputs.GORELEASER_VERSION }} + args: release --clean --snapshot --skip=docker diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 1f0640b..44f0d6f 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -42,7 +42,15 @@ jobs: - name: Run Linter uses: golangci/golangci-lint-action@v8 with: - version: v2.10.2 + version: v2.7.2 + + - name: Setup gotestsum + uses: gertd/action-gotestsum@v3.0.0 + with: + gotestsum_version: v1.13.0 + + - name: Download nmap + run: sudo apt-get install -y nmap - name: Run Tests env: diff --git a/targets.m3u b/targets.m3u deleted file mode 100644 index fbd8a93..0000000 --- a/targets.m3u +++ /dev/null @@ -1,5 +0,0 @@ -#EXTM3U -#EXTINF:-1,127.0.0.1:8554 (GStreamer rtspd) -rtsp://admin:12345@127.0.0.1:8554/live.sdp -#EXTINF:-1,127.0.0.1:8555 (GStreamer rtspd) -rtsp://admin:12345@127.0.0.1:8555/live.sdp