37 lines
889 B
YAML
37 lines
889 B
YAML
---
|
|
name: publish controller image
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
paths:
|
|
- '.gitea/workflows/publish-images.yml'
|
|
- 'container/controller.Dockerfile'
|
|
- 'cmd/**'
|
|
- 'internal/**'
|
|
- 'scripts/publish-image'
|
|
- 'go.mod'
|
|
- 'go.sum'
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
publish-controller:
|
|
name: publish-controller
|
|
runs-on: [self-hosted, vm]
|
|
timeout-minutes: 45
|
|
permissions:
|
|
contents: read
|
|
env:
|
|
PUSH_REGISTRY: zot-push.ad.ddupan.top
|
|
PULL_REGISTRY: zot.ad.ddupan.top
|
|
IMAGE_NAME: controller
|
|
IMAGE_REPOSITORY: panxiao81/gitea-dynamic-runner-controller
|
|
IMAGE_DOCKERFILE: container/controller.Dockerfile
|
|
SPIRE_AGENT_SOCKET: /run/spire/agent-sockets/spire-agent.sock
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Build and publish
|
|
shell: bash
|
|
run: scripts/publish-image
|