unos/.gitea/workflows/watchdog-be-build.yaml

32 lines
965 B
YAML
Raw Permalink Normal View History

2024-03-14 05:10:52 +00:00
on:
pull_request:
types:
- labeled
- opened
- synchronize
- closed
workflow_dispatch:
permissions:
pull-requests: read
jobs:
build-watchdog-be:
runs-on: ubuntu-latest
container:
image: catthehacker/ubuntu:act-latest
defaults:
run:
working-directory: ./watch-dog-be
if: contains(github.event.pull_request.labels.*.name,'watchdog-be')
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v4
with:
distribution: 'temurin' # See 'Supported distributions' for available options
java-version: '21'
- uses: gradle/actions/setup-gradle@v3
2024-03-14 05:26:15 +00:00
- run: ./gradlew jibBuildTar
2024-03-14 05:19:34 +00:00
if: github.event.pull_request.merged == false
- run: ./gradlew jib -Djib.to.image=git.usbharu.dev/usbharu/watchdog-be -Djib.to.auth.username=usbharu -Djib.to.auth.password=${{ secrets.DEPLOY_TOKEN }}
if: github.event.pull_request.merged == true