From 8f428a9440ee4cc2c3b368c9990b4acf1c70830f Mon Sep 17 00:00:00 2001 From: usbharu <64310155+usbharu@users.noreply.github.com> Date: Tue, 19 Mar 2024 18:31:48 +0900 Subject: [PATCH] =?UTF-8?q?now-playing:=20ci=E3=82=92=E8=BF=BD=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/now-playing.yaml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .gitea/workflows/now-playing.yaml diff --git a/.gitea/workflows/now-playing.yaml b/.gitea/workflows/now-playing.yaml new file mode 100644 index 0000000..5fb6682 --- /dev/null +++ b/.gitea/workflows/now-playing.yaml @@ -0,0 +1,31 @@ +on: + pull_request: + types: + - labeled + - opened + - synchronize + - closed + workflow_dispatch: + +permissions: + pull-requests: read + +jobs: + build-docker-image: + runs-on: ubuntu-latest + container: + image: catthehacker/ubuntu:act-latest + defaults: + run: + working-directory: ./now-playing + if: contains(github.event.pull_request.labels.*.name,'now-playing') + + + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "^1.20" + - run: go build -o now-playing -ldflags="-s -w" -trimpath + - run: curl --user usbharu:${{ secrets.DEPLOY_TOKEN }} --upload-file now-playing https://git.usbharu.dev/api/packages/usbharu/generic/now-playing/${{ github.sha }}/now-playing + if: github.event.pull_request.merged == true \ No newline at end of file