watchdog-go: fix
/ test (pull_request) Successful in 1s Details
/ build-docker-image (pull_request) Has been skipped Details

This commit is contained in:
usbharu 2024-03-11 17:33:53 +09:00
parent 3d806aab92
commit e9ff65261d
Signed by: usbharu
GPG Key ID: 6556747BF94EEBC8
1 changed files with 32 additions and 29 deletions

View File

@ -1,32 +1,35 @@
on:
pull_request:
types:
- opened
- synchronize
- labeled
workflow_dispatch:
on:
pull_request:
types:
- opened
- synchronize
- labeled
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo ${{github.event.action}}
- run: echo ${{github.event.pull_request.labels}}
permissions:
pull-requests: read
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')) ||
(github.event.action == 'workflow_dispatch')
jobs:
test:
runs-on: ubuntu-latest
steps:
- run: echo ${{github.event.action}}
- run: echo ${{github.event.pull_request.labels}}
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 }}
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')) ||
(github.event.action == 'workflow_dispatch')
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 }}