|
9 | 9 |
|
10 | 10 | concurrency:
|
11 | 11 | group: build-kobo-ssh
|
12 |
| - cancel-in-progress: true |
| 12 | + cancel-in-progress: false |
13 | 13 |
|
14 | 14 | jobs:
|
15 | 15 | filter-changes:
|
16 | 16 | name: Filter changes
|
17 | 17 | runs-on: ubuntu-latest
|
18 | 18 | outputs:
|
19 |
| - toolchain_changed: ${{ steps.toolchain-changed-files.outputs.any_changed }} |
20 |
| - build_changed: ${{ steps.build-changed-files.outputs.any_changed }} |
| 19 | + build_changed: ${{ steps.build-files-changed.outputs.any_changed }} |
21 | 20 | steps:
|
22 | 21 | - name: Checkout
|
23 | 22 | uses: actions/checkout@v4
|
24 | 23 |
|
25 |
| - - name: Toolchain Changed Files |
26 |
| - id: toolchain-changed-files |
27 |
| - uses: tj-actions/changed-files@v45 |
28 |
| - with: |
29 |
| - files: | |
30 |
| - toolchain/** |
31 |
| -
|
32 |
| - - name: Build Changed Files |
33 |
| - id: build-changed-files |
| 24 | + - name: Build files changed |
| 25 | + id: build-files-changed |
34 | 26 | uses: tj-actions/changed-files@v45
|
35 | 27 | with:
|
36 | 28 | files: |
|
37 | 29 | .github/workflows/build.yaml
|
38 | 30 | KoboRoot/**
|
39 |
| - compile.sh |
| 31 | + Dockerfile |
40 | 32 |
|
41 |
| - build-toolchain-image: |
42 |
| - if: ${{ needs.filter-changes.outputs.toolchain_changed == 'true' }} |
43 |
| - name: Build toolchain image |
| 33 | + build-koboroot: |
| 34 | + if: ${{ needs.filter-changes.outputs.build_changed == 'true' }} |
| 35 | + name: Build KoboRoot |
44 | 36 | runs-on: ubuntu-latest
|
| 37 | + needs: |
| 38 | + - filter-changes |
45 | 39 | permissions:
|
46 |
| - contents: read |
47 |
| - packages: write |
| 40 | + contents: write |
| 41 | + env: |
| 42 | + TOOLCHAIN_IMAGE: kobo-ssh-toolchain:latest |
48 | 43 | steps:
|
49 | 44 | - name: Checkout
|
50 | 45 | uses: actions/checkout@v4
|
51 | 46 |
|
52 | 47 | - name: Set up Docker Buildx
|
53 | 48 | uses: docker/setup-buildx-action@v3
|
54 | 49 |
|
55 |
| - - name: Login to image registry |
56 |
| - uses: docker/login-action@v3 |
57 |
| - with: |
58 |
| - registry: ghcr.io |
59 |
| - username: ${{ github.actor }} |
60 |
| - password: ${{ github.token }} |
61 |
| - |
62 |
| - - name: Docker meta |
63 |
| - id: meta |
64 |
| - uses: docker/metadata-action@v5 |
65 |
| - with: |
66 |
| - images: | |
67 |
| - ghcr.io/${{ github.repository_owner }}/kobo-ssh-toolchain |
68 |
| - tags: | |
69 |
| - type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} |
70 |
| - type=ref,event=branch |
71 |
| - type=ref,event=tag |
72 |
| -
|
73 | 50 | - name: Build image
|
74 | 51 | uses: docker/build-push-action@v6
|
75 | 52 | id: build
|
| 53 | + env: |
| 54 | + DOCKER_BUILD_RECORD_UPLOAD: false |
| 55 | + DOCKER_BUILD_SUMMARY: false |
76 | 56 | with:
|
77 |
| - context: toolchain |
78 |
| - file: ./Dockerfile |
79 |
| - push: true |
80 |
| - tags: ${{ steps.meta.outputs.tags }} |
81 |
| - labels: ${{ steps.meta.outputs.labels }} |
| 57 | + push: false |
| 58 | + load: true |
| 59 | + tags: ${{ env.TOOLCHAIN_IMAGE }} |
82 | 60 | cache-from: type=gha
|
83 | 61 | cache-to: type=gha,mode=max
|
84 | 62 |
|
85 |
| - build-koboroot: |
86 |
| - if: ${{ needs.filter-changes.outputs.build_changed == 'true' }} |
87 |
| - name: Build KoboRoot |
88 |
| - runs-on: ubuntu-latest |
89 |
| - needs: |
90 |
| - - filter-changes |
91 |
| - - build-toolchain-image |
92 |
| - permissions: |
93 |
| - contents: read |
94 |
| - packages: read |
95 |
| - env: |
96 |
| - TOOLCHAIN_IMAGE: ghcr.io/${{ github.repository_owner }}/kobo-ssh-toolchain:latest |
97 |
| - DROPBEAR_TAG: DROPBEAR_2025.87 |
98 |
| - OPENSSH_TAG: V_9_9_P2 |
99 |
| - steps: |
100 |
| - - name: Checkout |
101 |
| - uses: actions/checkout@v4 |
102 |
| - |
103 |
| - - name: Clone dropbear sources |
104 |
| - run: | |
105 |
| - git clone --depth 1 --branch "${{ env.DROPBEAR_TAG }}" https://github.com/mkj/dropbear.git external/dropbear |
106 |
| -
|
107 |
| - - name: Build dropbear |
108 |
| - uses: kohlerdominik/docker-run-action@v2 |
| 63 | + - name: Fetch build output |
| 64 | + uses: kohlerdominik/[email protected] |
109 | 65 | with:
|
110 | 66 | image: ${{ env.TOOLCHAIN_IMAGE }}
|
111 | 67 | volumes: |
|
112 |
| - ${{ github.workspace }}:/workspace |
113 |
| - workdir: /workspace |
| 68 | + ${{ github.workspace }}/dist:/dist |
114 | 69 | run: |
|
115 |
| - export PATH="/root/x-tools/arm-kobo-linux-gnueabihf/bin:$PATH" |
116 |
| - autoconf |
117 |
| - autoheader |
118 |
| - ./configure --host=arm-kobo-linux-gnueabihf --disable-zlib --disable-zlib CC="arm-kobo-linux-gnueabihf"-gcc LD="arm-kobo-linux-gnueabihf"-ld --disable-wtmp --disable-lastlog --disable-syslog --disable-utmpx --disable-utmp --disable-wtmpx --disable-loginfunc --disable-pututxline --disable-pututline --enable-bundled-libtom --disable-pam |
119 |
| - make clean |
120 |
| - make PROGRAMS="dropbear dropbearkey" MULTI=1 |
| 70 | + cp /output/KoboRoot.tgz /dist/ |
| 71 | +
|
| 72 | + - name: Release artifact |
| 73 | + uses: softprops/action-gh-release@v2 |
| 74 | + with: |
| 75 | + tag_name: "2025.87" |
| 76 | + body: | |
| 77 | + Dropbear 2025.87 for Kobo eReaders |
| 78 | + files: dist/KoboRoot.tgz |
0 commit comments