watchdog-go: ci

This commit is contained in:
usbharu 2024-03-11 17:19:03 +09:00
parent cd72516eac
commit 82141c76fc
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
1 changed files with 24 additions and 0 deletions

View File

@ -0,0 +1,24 @@
on:
pull_request:
types:
- opened
- synchronize
- labeled
jobs:
build-docker-image:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./watchdog-go
if: |
((github.event.action == 'labeled') &&
(github.event.label.name == 'watchdog-go')) ||
((github.event.action == 'synchronize') &&
contains(github.event.pull_request.labels.*.name, 'watchdog-go')
steps:
- uses: actions/checkout@v3
- run: docker login -u usbharu -p ${{ secrets.DEPLOY_TOKEN }} git.usbharu.dev
- run: docker build ./ watchdog-go -t latest -t ${{ github.sha }}
- run: docker push git.usbharu.dev/usbharu/watchdog-go:${{ github.sha }}