From 82141c76fcd2c9793686669a43601d40c1379ba2 Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:19:03 +0900 Subject: [PATCH] watchdog-go: ci --- .gitea/workflows/watchdog-build.yaml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .gitea/workflows/watchdog-build.yaml diff --git a/.gitea/workflows/watchdog-build.yaml b/.gitea/workflows/watchdog-build.yaml new file mode 100644 index 0000000..432a038 --- /dev/null +++ b/.gitea/workflows/watchdog-build.yaml @@ -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 }} \ No newline at end of file