diff --git a/.github/actions/build/.dockerignore b/.github/actions/build/.dockerignore deleted file mode 100644 index a6fde23..0000000 --- a/.github/actions/build/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -_build/ -deps/ -build.log -archive.log -.nerves/ -dist/ diff --git a/.github/actions/build/Dockerfile b/.github/actions/build/Dockerfile deleted file mode 100644 index a66ea5d..0000000 --- a/.github/actions/build/Dockerfile +++ /dev/null @@ -1,39 +0,0 @@ -FROM nervesproject/nerves_system_br:1.17.2 -LABEL "com.github.actions.name"="Build System" -LABEL "com.github.actions.description"="Build Nerves System" -LABEL "com.github.actions.icon"="package" -LABEL "com.github.actions.color"="blue" - -LABEL "repository"="https://github.com/bcdevices/ly11-system-rpi4" -LABEL "homepage"="https://github.com/bcdevices/ly11-system-rpi4" -LABEL "maintainer"="Blue Clover Devices" - -ENV ELIXIR_VERSION=1.12.3-otp-24 - -RUN apt-get update && \ - apt install -y \ - subversion \ - u-boot-tools \ - ca-certificates - -#Install Elixir -RUN wget https://repo.hex.pm/builds/elixir/v$ELIXIR_VERSION.zip && \ - unzip -d /usr/local/elixir v$ELIXIR_VERSION.zip - -ENV PATH /usr/local/elixir/bin:$PATH - -#Create Work Directory -RUN mkdir -p /nerves-system - -#Set Working Directory -WORKDIR /nerves-system - -RUN mkdir -p /root/local -RUN mkdir -p /root/empty - -# COPY -COPY . /nerves-system - -ADD entrypoint.sh /entrypoint.sh - -CMD ["/entrypoint.sh"] diff --git a/.github/actions/build/action.yaml b/.github/actions/build/action.yaml deleted file mode 100644 index eca6273..0000000 --- a/.github/actions/build/action.yaml +++ /dev/null @@ -1,5 +0,0 @@ -name: "Build" -description: "Build Rpi4 system" -runs: - using: "docker" - image: "Dockerfile" diff --git a/.github/actions/build/entrypoint.sh b/.github/actions/build/entrypoint.sh deleted file mode 100755 index 41cea88..0000000 --- a/.github/actions/build/entrypoint.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e - -mkdir -p /github/workspace/.nerves - -mkdir -p /github/workspace/nerves-buildroot-cache - -NERVES_BR_DL_DIR=/github/workspace/nerves-buildroot-cache make dist - -set +e - -cp /github/workspace/nerves-buildroot-cache/ly11_system_rpi4* dist/ - -set -e - -make dist-test-app - diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 67ddb39..ffd7661 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -5,6 +5,9 @@ jobs: build: name: Build Nerves system runs-on: ubuntu-latest + container: nervesproject/nerves_system_br:1.18.5 + env: + ELIXIR_VERSION: 1.12.3-otp-24 steps: - name: Checkout code uses: actions/checkout@v2 @@ -15,16 +18,26 @@ jobs: uses: actions/cache@v2 with: path: | - nerves-buildroot-cache + ~/.nerves/dl key: buildroot-cache-${{ hashFiles('VERSION', 'mix.lock') }} restore-keys: | buildroot-cache- buidroot-dl- - - name: Build - uses: ./.github/actions/build + - name: Setup elixir + run: | + wget https://repo.hex.pm/builds/elixir/v$ELIXIR_VERSION.zip + unzip -d /usr/local/elixir v$ELIXIR_VERSION.zip + echo "/usr/local/elixir/bin" >> $GITHUB_PATH + - name: build + run: | + apt-get update + apt-get install -y u-boot-tools + mkdir -p /root/local + mkdir -p /root/empty + make dist - name: Clear Artifacts run: | - rm -rf $GITHUB_WORKSPACE/nerves-buildroot-cache/ly11_system_rpi4-portable* + rm -rf $HOME/.nerves/dl/ly11_system_rpi4-portable* - name: Upload S3 uses: jakejarvis/s3-sync-action@master with: @@ -34,7 +47,7 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION: 'us-west-1' - SOURCE_DIR: 'dist' + SOURCE_DIR: $HOME/.nerves/dl - name: Upload Artifacts if: contains(github.ref, 'tags') uses: svenstaro/upload-release-action@v2 @@ -52,5 +65,5 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_REGION: 'us-west-1' - SOURCE_DIR: 'nerves-buildroot-cache' + SOURCE_DIR: $HOME/.nerves/dl continue-on-error: true