From e9ff65261dfb5454f9c7392bd024551e923877dd Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Mon, 11 Mar 2024 17:33:53 +0900 Subject: [PATCH] watchdog-go: fix --- .gitea/workflows/watchdog-build.yaml | 61 +++++++++++++++------------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/.gitea/workflows/watchdog-build.yaml b/.gitea/workflows/watchdog-build.yaml index 1107fea..c9162ab 100644 --- a/.gitea/workflows/watchdog-build.yaml +++ b/.gitea/workflows/watchdog-build.yaml @@ -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 }} \ No newline at end of file + 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 }} \ No newline at end of file