2024-03-11 10:09:22 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types:
|
2024-03-13 02:16:58 +00:00
|
|
|
- labeled
|
|
|
|
- opened
|
|
|
|
- synchronize
|
2024-03-13 02:02:09 +00:00
|
|
|
- closed
|
2024-03-11 10:09:22 +00:00
|
|
|
workflow_dispatch:
|
2024-03-11 08:19:03 +00:00
|
|
|
|
2024-03-11 10:09:22 +00:00
|
|
|
permissions:
|
|
|
|
pull-requests: read
|
2024-03-11 08:19:03 +00:00
|
|
|
|
2024-03-11 10:09:22 +00:00
|
|
|
jobs:
|
|
|
|
build-docker-image:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: catthehacker/ubuntu:act-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ./watchdog-go
|
2024-03-13 02:16:58 +00:00
|
|
|
if: contains(github.event.pull_request.labels.*.name,'watchdog-go')
|
2024-03-13 02:02:09 +00:00
|
|
|
|
2024-03-11 10:09:22 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: https://github.com/docker/setup-buildx-action@v3
|
|
|
|
- uses: https://github.com/docker/login-action@v3
|
|
|
|
with:
|
|
|
|
registry: git.usbharu.dev
|
|
|
|
username: usbharu
|
|
|
|
password: ${{ secrets.DEPLOY_TOKEN }}
|
|
|
|
- uses: https://github.com/docker/build-push-action@v5
|
|
|
|
with:
|
|
|
|
context: ./watchdog-go
|
|
|
|
|
|
|
|
tags: git.usbharu.dev/usbharu/watchdog-go:latest,git.usbharu.dev/usbharu/watchdog-go:${{ github.sha }}
|
2024-03-13 02:16:58 +00:00
|
|
|
push: $${{ github.event.pull_request.merged == true }}
|