2024-03-13 09:32:29 +00:00
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
types:
|
|
|
|
- labeled
|
|
|
|
- opened
|
|
|
|
- synchronize
|
|
|
|
- closed
|
|
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
|
|
pull-requests: read
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build-tool:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container:
|
|
|
|
image: catthehacker/ubuntu:act-latest
|
|
|
|
defaults:
|
|
|
|
run:
|
|
|
|
working-directory: ./gitea-packages-update-check
|
|
|
|
if: contains(github.event.pull_request.labels.*.name,'gitea-packages-update-check')
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2024-03-13 09:35:01 +00:00
|
|
|
- uses: actions/setup-go@v4
|
|
|
|
with:
|
|
|
|
go-version: "^1.20"
|
2024-03-13 09:32:29 +00:00
|
|
|
- run: go build -o gitea-packages-update-check -ldflags="-s -w" -trimpath
|
|
|
|
- run: curl --user usbharu:${{ secrets.DEPLOY_TOKEN }} --upload-file gitea-packages-update-check https://git.usbharu.dev/api/packages/usbharu/generic/gitea-packages-update-check/${{ github.sha }}/gitea-packages-update-check
|
|
|
|
if: github.event.pull_request.merged == true
|