fix: build and test workflows
This commit is contained in:
@@ -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 }}
|
||||
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN || secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: ${{ inputs.GORELEASER_VERSION }}
|
||||
args: release --clean --snapshot --skip=docker
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user