now-playing: ciを追加
This commit is contained in:
parent
9d677491f8
commit
8f428a9440
|
@ -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
|
Loading…
Reference in New Issue