File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change 1+ OpenHarmony-v6.0-Release
2+ code-v6.0-Release.tar.gz
3+ system
4+ ramdisk
5+ curl-8.8.0-ohos-arm64
Original file line number Diff line number Diff line change 1+ FROM scratch
2+ COPY ./ramdisk /
3+ CMD ["/bin/sh" ]
You can’t perform that action at this time.
0 commit comments