Currently each Kernel compilation takes about 30 minutes of which 20
minutes are used to compile our tools. While the toolchain is downloaded
and instantly ready the tools are missing.
This commit starts uploading a Docker container including compiled tools
which are ready to use. It is automatically updated whenever any tools
are changed.
Signed-off-by: Paul Spooren <mail@aparcar.org>
--- /dev/null
+FROM registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1
+
+COPY --chown=buildbot:buildbot ./openwrt/ /openwrt/
+
+WORKDIR /openwrt
matrix:
target: ${{fromJson(needs.determine_targets.outputs.target)}}
- container: registry.gitlab.com/openwrt/buildbot/buildworker-3.4.1
-
+ container: ghcr.io/openwrt/tools:latest
steps:
- name: Checkout master directory
uses: actions/checkout@v2
paths:
- 'tools/**'
- '.github/workflows/tools.yml'
+ push:
+ paths:
+ - 'tools/**'
+ - '.github/workflows/tools.yml'
jobs:
build:
cp -r "$WORKPATH/logs" "$GITHUB_WORKSPACE"
cp -r "$WORKPATH/.config" "$GITHUB_WORKSPACE/config"
-
- name: Upload logs
if: always()
uses: actions/upload-artifact@v2
with:
name: ${{ matrix.os }}-config
path: "config"
+
+ - name: Build and push
+ if: matrix.os == 'ubuntu-latest'
+ #if: github.event_name != 'pull_request' && matrix.os == 'ubuntu-latest'
+ uses: docker/build-push-action@v3
+ with:
+ push: true
+ tags: openwrt/tools:latest
+ file: .github/workflows/Dockerfile.tools