Merge pull request 'watchdog-go: ci動作の条件を変更' (#4) from watchdog-go-ci into master
Reviewed-on: #4
This commit is contained in:
commit
22b209356a
|
@ -1,6 +1,9 @@
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
|
- labeled
|
||||||
|
- opened
|
||||||
|
- synchronize
|
||||||
- closed
|
- closed
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
|
@ -15,7 +18,7 @@ jobs:
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: ./watchdog-go
|
working-directory: ./watchdog-go
|
||||||
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name,'watchdog-go')
|
if: contains(github.event.pull_request.labels.*.name,'watchdog-go')
|
||||||
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
@ -31,4 +34,4 @@ jobs:
|
||||||
context: ./watchdog-go
|
context: ./watchdog-go
|
||||||
|
|
||||||
tags: git.usbharu.dev/usbharu/watchdog-go:latest,git.usbharu.dev/usbharu/watchdog-go:${{ github.sha }}
|
tags: git.usbharu.dev/usbharu/watchdog-go:latest,git.usbharu.dev/usbharu/watchdog-go:${{ github.sha }}
|
||||||
push: true
|
push: ${{ github.event.pull_request.merged == true }}
|
|
@ -1,7 +1,7 @@
|
||||||
FROM golang:1.22.1-alpine3.19 as build
|
FROM golang:1.22.1-alpine3.19 as build
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
COPY go.mod go.sum main.go ./
|
COPY go.mod go.sum main.go ./
|
||||||
COPY git.usbharu.dev/ ./git.usbharu.dev
|
COPY watchdog/ ./watchdog
|
||||||
RUN go mod download && go build -o watchdog-go -ldflags="-s -w" -trimpath
|
RUN go mod download && go build -o watchdog-go -ldflags="-s -w" -trimpath
|
||||||
|
|
||||||
FROM alpine:3.19
|
FROM alpine:3.19
|
||||||
|
|
Loading…
Reference in New Issue