Skip to content

Commit f1aaf42

Browse files
committed
ci: added installer factory pipeline, +rpi image factory image
1 parent 5f69e4f commit f1aaf42

2 files changed

Lines changed: 69 additions & 1 deletion

File tree

‎.github/workflows/docker-image-factory.yml‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ on:
99
- '*'
1010
paths:
1111
- image-factory/**
12+
- updater/*.sh
1213
- .github/workflows/docker-image-factory.yml
1314
workflow_dispatch:
1415

@@ -62,6 +63,6 @@ jobs:
6263
org.opencontainers.image.revision=${{ github.sha }}
6364
org.opencontainers.image.created=${{ github.run_id }}
6465
org.opencontainers.image.version=${{ steps.vars.outputs.tag }}
65-
#platforms: linux/amd64,linux/arm64,linux/arm/v7
66+
platforms: linux/amd64,linux/arm64
6667
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cuos-image-factory:buildcache
6768
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cuos-image-factory:buildcache,mode=max
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build and Push cuos-installer-factory (Multi-Arch)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- development
8+
tags:
9+
- '*'
10+
paths:
11+
- installer-factory/**
12+
- .github/workflows/docker-installer-factory.yml
13+
workflow_dispatch:
14+
15+
jobs:
16+
build-and-push:
17+
if: github.event_name != 'pull_request'
18+
runs-on: ubuntu-latest
19+
permissions:
20+
contents: read
21+
packages: write
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v5
25+
26+
- name: Set up QEMU
27+
uses: docker/setup-qemu-action@v3
28+
29+
- name: Set up Docker Buildx
30+
uses: docker/setup-buildx-action@v3
31+
32+
- name: Login to GitHub Container Registry
33+
uses: docker/login-action@v3
34+
with:
35+
registry: ghcr.io
36+
username: ${{ github.actor }}
37+
password: ${{ secrets.GITHUB_TOKEN }}
38+
39+
- name: Set image tag
40+
id: vars
41+
run: |
42+
if [[ "$GITHUB_REF" == refs/tags/* ]]; then
43+
TAG=${GITHUB_REF#refs/tags/}
44+
elif [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
45+
TAG=latest
46+
else
47+
TAG=${GITHUB_REF#refs/heads/}
48+
TAG=${TAG//\//-}
49+
fi
50+
echo "tag=$TAG" >> $GITHUB_OUTPUT
51+
52+
- name: Build and push Docker image - cuos-installer-factory
53+
uses: docker/build-push-action@v6
54+
with:
55+
context: ./
56+
file: ./installer-factory/Dockerfile
57+
push: true
58+
tags: |
59+
ghcr.io/${{ github.repository_owner }}/cuos-installer-factory:${{ steps.vars.outputs.tag }}
60+
labels: |
61+
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
62+
org.opencontainers.image.revision=${{ github.sha }}
63+
org.opencontainers.image.created=${{ github.run_id }}
64+
org.opencontainers.image.version=${{ steps.vars.outputs.tag }}
65+
#platforms: linux/amd64,linux/arm64,linux/arm/v7
66+
cache-from: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cuos-installer-factory:buildcache
67+
cache-to: type=registry,ref=ghcr.io/${{ github.repository_owner }}/cuos-installer-factory:buildcache,mode=max

0 commit comments

Comments
 (0)