-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (65 loc) · 1.94 KB
/
docker.yml
File metadata and controls
73 lines (65 loc) · 1.94 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Build container images
on:
push:
tags: ["v*"]
workflow_dispatch:
inputs:
tag:
description: "Image tag (e.g. v0.3.0)"
required: true
permissions:
contents: read
packages: write
env:
REGISTRY: ghcr.io
IMAGE_PREFIX: ghcr.io/irantransitionproject
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
image:
- name: baft-worker
dockerfile: docker/Dockerfile.worker
- name: baft-router
dockerfile: docker/Dockerfile.router
- name: baft-pipeline
dockerfile: docker/Dockerfile.pipeline
- name: baft-workshop
dockerfile: docker/Dockerfile.workshop
- name: baft-mcp
dockerfile: docker/Dockerfile.mcp
- name: baft-import
dockerfile: docker/Dockerfile.import
- name: baft-commit-agent
dockerfile: docker/Dockerfile.commit-agent
steps:
- uses: actions/checkout@v4
- name: Checkout heddle
uses: actions/checkout@v4
with:
repository: getheddle/heddle
path: heddle
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set image tag
id: tag
run: |
if [ "${{ github.event_name }}" = "workflow_dispatch" ]; then
echo "tag=${{ github.event.inputs.tag }}" >> "$GITHUB_OUTPUT"
else
echo "tag=${GITHUB_REF_NAME}" >> "$GITHUB_OUTPUT"
fi
- name: Build and push
uses: docker/build-push-action@v6
with:
context: .
file: ${{ matrix.image.dockerfile }}
push: true
tags: |
${{ env.IMAGE_PREFIX }}/${{ matrix.image.name }}:${{ steps.tag.outputs.tag }}
${{ env.IMAGE_PREFIX }}/${{ matrix.image.name }}:latest