Skip to content

Commit 2fc4de9

Browse files
committed
chore: add testing to workflow
1 parent 2a29c43 commit 2fc4de9

1 file changed

Lines changed: 21 additions & 1 deletion

File tree

.github/workflows/docker.yml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,31 @@
99

1010
name: Publish Docker image
1111

12-
on: workflow_dispatch
12+
on:
13+
push:
14+
branches: [main]
1315

1416
jobs:
17+
test:
18+
name: Go Test
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version-file: go.mod
27+
28+
- name: Build
29+
run: go build -v ./...
30+
31+
- name: Test
32+
uses: robherley/go-test-action@v0
33+
1534
push_to_registry:
1635
name: Push Docker image to Docker Hub
36+
needs: test
1737
runs-on: ubuntu-latest
1838
permissions:
1939
packages: write

0 commit comments

Comments
 (0)