35 lines
907 B
YAML
35 lines
907 B
YAML
name: build-and-push
|
|
|
|
# Bygger image:n på Pi5-runnern (arm64, nativt) och pushar till den lokala
|
|
# registryn. localhost:5000 trustas automatiskt av Docker (ingen insecure-config).
|
|
on:
|
|
push:
|
|
branches: [master, main]
|
|
paths:
|
|
- "packages/**"
|
|
- "Dockerfile"
|
|
- ".dockerignore"
|
|
- "pnpm-lock.yaml"
|
|
- "package.json"
|
|
- ".gitea/workflows/build.yaml"
|
|
workflow_dispatch: {}
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Build image
|
|
run: |
|
|
docker build \
|
|
-t localhost:5000/agent-helm-server:latest \
|
|
-t "localhost:5000/agent-helm-server:${GITHUB_SHA::12}" \
|
|
.
|
|
|
|
- name: Push image
|
|
run: |
|
|
docker push localhost:5000/agent-helm-server:latest
|
|
docker push "localhost:5000/agent-helm-server:${GITHUB_SHA::12}"
|