Skip to content

Commit 5a20d6e

Browse files
committed
First version
1 parent 8c6f162 commit 5a20d6e

10 files changed

Lines changed: 2560 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
tags: [ '*' ]
7+
8+
env:
9+
GHCR_REGISTRY: ghcr.io
10+
IMAGE_NAME: ${{ github.repository }}
11+
12+
jobs:
13+
build-and-release:
14+
runs-on: self-hosted
15+
permissions:
16+
contents: read
17+
packages: write
18+
id-token: write
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v5
23+
24+
- name: Build
25+
run: |
26+
./build-images.sh
27+
./build-curl.sh
28+
./build-rootfs.sh
29+
30+
- name: Set up Docker Buildx
31+
uses: docker/setup-buildx-action@v4
32+
33+
- name: Log into Docker Hub
34+
if: github.event_name != 'pull_request'
35+
uses: docker/login-action@v4
36+
with:
37+
username: ${{ secrets.DOCKERHUB_USERNAME }}
38+
password: ${{ secrets.DOCKERHUB_TOKEN }}
39+
40+
- name: Log into GHCR
41+
if: github.event_name != 'pull_request'
42+
uses: docker/login-action@v4
43+
with:
44+
registry: ${{ env.GHCR_REGISTRY }}
45+
username: ${{ github.actor }}
46+
password: ${{ secrets.GITHUB_TOKEN }}
47+
48+
- name: Extract Docker metadata
49+
id: meta
50+
uses: docker/metadata-action@v6
51+
with:
52+
images: |
53+
${{ env.GHCR_REGISTRY }}/${{ env.IMAGE_NAME }}
54+
${{ secrets.DOCKERHUB_USERNAME }}/${{ github.event.repository.name }}
55+
tags: |
56+
type=ref,event=branch
57+
type=ref,event=tag
58+
59+
- name: Build and push Docker image
60+
id: build-and-push
61+
uses: docker/build-push-action@v7
62+
with:
63+
context: .
64+
platforms: linux/arm64
65+
push: ${{ github.event_name != 'pull_request' }}
66+
tags: ${{ steps.meta.outputs.tags }}
67+
labels: ${{ steps.meta.outputs.labels }}

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
OpenHarmony-v6.0-Release
2+
code-v6.0-Release.tar.gz
3+
system
4+
ramdisk
5+
curl-8.8.0-ohos-arm64

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
FROM scratch
2+
COPY ./ramdisk /
3+
CMD ["/bin/sh"]

0 commit comments

Comments
 (0)