diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5b51d11..98049ee 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -99,3 +99,15 @@ jobs: url: ${{ secrets.GITLAB_URL }} token: ${{ secrets.GITLAB_TOKEN }} username: ${{ secrets.GITLAB_USERNAME }} + - + name: Send mail + uses: action-pack/send-mail@v1 + with: + to: ${{secrets.MAILTO}} + from: Github Actions <${{secrets.MAILTO}}> + connection_url: ${{secrets.MAIL_CONNECTION}} + subject: Build of ${{ github.event.repository.name }} v${{ steps.meta.outputs.version }} completed + body: | + The build job of ${{ github.event.repository.name }} v${{ steps.meta.outputs.version }} was completed successfully! + + See https://github.com/${{ github.repository }}/actions for more information. diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 09a790e..34012ac 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -15,10 +15,10 @@ jobs: uses: actions/setup-go@v5 with: cache: false - go-version: '1.21.6' + go-version-file: 'src/go.mod' - name: Run golangci-lint - uses: golangci/golangci-lint-action@v3 + uses: golangci/golangci-lint-action@v4 with: version: latest working-directory: src @@ -34,3 +34,10 @@ jobs: - name: Run Go vet run: go vet ./... working-directory: src + + - name: Lint Dockerfile + uses: hadolint/hadolint-action@v3.1.0 + with: + dockerfile: Dockerfile + ignore: DL3008 + failure-threshold: warning diff --git a/.github/workflows/hub.yml b/.github/workflows/hub.yml index af5986e..15cb4d0 100644 --- a/.github/workflows/hub.yml +++ b/.github/workflows/hub.yml @@ -14,7 +14,7 @@ jobs: - uses: actions/checkout@v4 - name: Docker Hub Description - uses: peter-evans/dockerhub-description@v3 + uses: peter-evans/dockerhub-description@v4 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6c5ea11..1f55e8e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,6 +3,7 @@ on: pull_request: paths: - '**/*.go' + - 'Dockerfile' - '.github/workflows/test.yml' - '.github/workflows/check.yml' diff --git a/Dockerfile b/Dockerfile index ccac164..d989c08 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM --platform=$BUILDPLATFORM golang:1.21-alpine as builder +FROM --platform=$BUILDPLATFORM golang:1.22-alpine as builder COPY src/ /src/qemu-host/ WORKDIR /src/qemu-host diff --git a/readme.md b/readme.md index aee8d40..96e016f 100644 --- a/readme.md +++ b/readme.md @@ -1,6 +1,6 @@

QEMU Host
- +
@@ -24,14 +24,14 @@ version: "3" services: qemu: container_name: qemu - image: qemux/qemu-host:latest + image: qemux/qemu-host restart: on-failure ``` Via `docker run` ```bash -docker run -it --rm qemux/qemu-host:latest +docker run -it --rm qemux/qemu-host ``` ### Background @@ -65,6 +65,9 @@ Currently this is planned to be done as a pseudo-chardev that only QEMU/QMP sees The current list of supported RPCs is documented in qemu.git/qapi-schema-guest.json. +## Stars +[![Stars](https://starchart.cc/qemus/qemu-host.svg?variant=adaptive)](https://starchart.cc/qemus/qemu-host) + [build_url]: https://github.com/qemus/qemu-host/ [hub_url]: https://hub.docker.com/r/qemux/qemu-host/ [tag_url]: https://hub.docker.com/r/qemux/qemu-host/tags diff --git a/src/go.mod b/src/go.mod index 03038e7..0b834c1 100644 --- a/src/go.mod +++ b/src/go.mod @@ -1,3 +1,3 @@ module qemu-host -go 1.21.6 +go 1.22 diff --git a/src/main.go b/src/main.go index 87975fd..01a5313 100644 --- a/src/main.go +++ b/src/main.go @@ -217,7 +217,7 @@ func process_resp(req REQ, conn net.Conn) { if data != "" { req.RespLength = int32(len([]byte(data)) + 1) - } else if req.CommandID != 10 { + } else { log.Printf("No handler available for command: %d\n", req.CommandID) }