Repository navigation
62 lines (54 loc) · 1.89 KB
/
Copy pathcontainers.yml
File metadata and controls
62 lines (54 loc) · 1.89 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
name: containers
on:
push:
branches:
- dev
paths:
- packages/containers/**
- .github/workflows/containers.yml
- package.json
# Allow manual builds so the fork GHCR images (used by the test workflow's
# Linux container jobs) can be published without waiting for a `dev` push.
workflow_dispatch:
inputs:
registry:
description: "GHCR registry owner (fork by default)"
required: false
default: "vibecoder880"
tag:
description: "Image tag"
required: false
default: "24.04"
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
env:
REGISTRY: ghcr.io/${{ github.event.inputs.registry || 'vibecoder880' }}
TAG: ${{ github.event.inputs.tag || '24.04' }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: ./.github/actions/setup-bun
- name: Set up QEMU
uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@8d2750c68a42422c14e847fe6c8ac0403b4cbd6f # v3.12.0
- name: Login to GHCR
uses: docker/login-action@c94ce9fb468520275223c153574b00df6fe4bcc9 # v3.7.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
# The test workflow only needs the `base` + `bun-node` images (Node 24 + Bun
# preinstalled). Build/push those two so Linux CI can run in-container.
- name: Build and push containers
run: |
for image in base bun-node; do
echo "building ${REGISTRY}/build/${image}:${TAG}"
bun ./packages/containers/script/build.ts --push --only "$image"
done
env:
REGISTRY: ${{ env.REGISTRY }}
TAG: ${{ env.TAG }}