This commit is contained in:
parent
c0d87f1c0c
commit
f628c16d0c
|
@ -0,0 +1,41 @@
|
||||||
|
name: docker-ci
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 'main'
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
docker:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: catthehacker/ubuntu:act-latest
|
||||||
|
steps:
|
||||||
|
-
|
||||||
|
name: Checkout
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
-
|
||||||
|
name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
-
|
||||||
|
name: Login to DockerHub
|
||||||
|
uses: docker/login-action@v3
|
||||||
|
with:
|
||||||
|
registry: git.usbharu.dev
|
||||||
|
username: usbharu
|
||||||
|
password: ${{ secrets.PUBLIC_REPOSITORY_PACKAGE_WRITE_TOKEN }}
|
||||||
|
- name: metadata
|
||||||
|
id: meta
|
||||||
|
uses: docker/metadata-action@v5
|
||||||
|
with:
|
||||||
|
images: git.usbharu.dev/usbharu/misskey-exporter
|
||||||
|
tags: |
|
||||||
|
type=raw,value=latest
|
||||||
|
type=sha,prefix=,suffix=,format=short
|
||||||
|
- name: build
|
||||||
|
uses: docker/build-push-action@v5
|
||||||
|
with:
|
||||||
|
file: ./Dockerfile
|
||||||
|
push: true
|
||||||
|
tags: ${{ steps.meta.outputs.tags }}
|
||||||
|
labels: ${{ steps.meta.outputs.labels }}
|
15
main.go
15
main.go
|
@ -102,18 +102,6 @@ var (
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
|
|
||||||
type MetricGroup struct {
|
|
||||||
Basename string
|
|
||||||
Help string
|
|
||||||
Type string
|
|
||||||
Value []Metric
|
|
||||||
}
|
|
||||||
|
|
||||||
type Metric struct {
|
|
||||||
Label map[string]string
|
|
||||||
Value string
|
|
||||||
}
|
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
options, err := misskey.NewClientWithOptions(
|
options, err := misskey.NewClientWithOptions(
|
||||||
misskey.WithAPIToken(apiKey),
|
misskey.WithAPIToken(apiKey),
|
||||||
|
@ -159,5 +147,6 @@ func main() {
|
||||||
go collectTimeline()
|
go collectTimeline()
|
||||||
}()
|
}()
|
||||||
|
|
||||||
server.ListenAndServe()
|
logrus.Error(server.ListenAndServe())
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue