watchdog-go: ci 手動実行を許可 #1
|
@ -1,32 +1,35 @@
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types:
|
types:
|
||||||
- opened
|
- opened
|
||||||
- synchronize
|
- synchronize
|
||||||
- labeled
|
- labeled
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
jobs:
|
permissions:
|
||||||
test:
|
pull-requests: read
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- run: echo ${{github.event.action}}
|
|
||||||
- run: echo ${{github.event.pull_request.labels}}
|
|
||||||
|
|
||||||
build-docker-image:
|
jobs:
|
||||||
runs-on: ubuntu-latest
|
test:
|
||||||
defaults:
|
runs-on: ubuntu-latest
|
||||||
run:
|
steps:
|
||||||
working-directory: ./watchdog-go
|
- run: echo ${{github.event.action}}
|
||||||
if: |
|
- run: echo ${{github.event.pull_request.labels}}
|
||||||
((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:
|
build-docker-image:
|
||||||
- uses: actions/checkout@v3
|
runs-on: ubuntu-latest
|
||||||
- run: docker login -u usbharu -p ${{ secrets.DEPLOY_TOKEN }} git.usbharu.dev
|
defaults:
|
||||||
- run: docker build ./ watchdog-go -t latest -t ${{ github.sha }}
|
run:
|
||||||
- run: docker push git.usbharu.dev/usbharu/watchdog-go:${{ github.sha }}
|
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 }}
|
Loading…
Reference in New Issue