From 55a897eccd086e36776b61c94d3186dec575fd89 Mon Sep 17 00:00:00 2001 From: JacekZubielik <119136520+JacekZubielik@users.noreply.github.com> Date: Mon, 6 May 2024 01:59:22 +0200 Subject: [PATCH] Clean up code --- .github/workflows/lint.yml | 10 ----- .github/workflows/release.yml | 71 ++++++++++++++--------------------- LICENCE | 11 ++++++ readme.md => README.md | 5 +++ 4 files changed, 44 insertions(+), 53 deletions(-) create mode 100644 LICENCE rename readme.md => README.md (93%) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 544e653..e8ee438 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -21,16 +21,6 @@ jobs: with: fetch-depth: 0 - # - name: Setup Node 20 - # uses: actions/setup-node@v4 - # with: - # node-version: 20.12 - # cache: 'npm' - - # - name: Install dependencies - # run: | - # npm install - - name: Lint code uses: github/super-linter@v6 env: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cf4f7ad..f955293 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -2,7 +2,7 @@ name: Release on: pull_request: - branches: [main] + branches: [main,dev] types: - closed @@ -49,47 +49,32 @@ jobs: # DEFAULT_BRANCH: main # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - # build: - # name: Build - # # needs: [ linter ] - # runs-on: [ubuntu-latest] - - # steps: - # - name: Checkout code - # uses: actions/checkout@v4 - # with: - # fetch-depth: 0 - - # - name: Setup Node 20 - # uses: actions/setup-node@v4 - # with: - # node-version: 20.12 - # cache: 'npm' - - # - name: Install dependencies - # run: | - # npm ci + build: + name: Build + # needs: [ linter ] + runs-on: [ubuntu-latest] - # - name: Compile - # run: | - # npm run clean && \ - # npm run dist + steps: + - name: Checkout code + uses: actions/checkout@v4 + with: + fetch-depth: 0 - # - name: Create release zip - # run: zip -r release.zip . - # if: success() + - name: Create release zip + run: zip -r release.zip . + if: success() - # - name: Create artifact - # uses: actions/upload-artifact@v4 - # with: - # name: "app-${{ github.sha }}" - # path: | - # dist/*.js - # release.zip + - name: Create artifact + uses: actions/upload-artifact@v4 + with: + name: "app-${{ github.sha }}" + path: | + app/*.* + release.zip release: name: Release - # needs: [ build ] + needs: [ build ] runs-on: [ubuntu-latest] steps: @@ -142,16 +127,16 @@ jobs: type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} - type=sha +# type=sha - - name: Login to DockerHub ${{ env.REGISTRY }} + - name: Login to DockerHub # if: github.event_name != 'pull_request' uses: docker/login-action@v3 with: username: ${{ secrets.DOCKERHUB_USERNAME }} password: ${{ secrets.DOCKERHUB_TOKEN }} - - name: Login to GitHub Container Registry ${{ env.REGISTRY }} + - name: Login to GitHub Container Registry uses: docker/login-action@v3 with: registry: ghcr.io @@ -167,10 +152,10 @@ jobs: labels: ${{ steps.meta.outputs.labels }} platforms: linux/amd64,linux/arm64 - - name: Move cache - run: | - rm -rf /tmp/.buildx-cache - mv /tmp/.buildx-cache-new /tmp/.buildx-cache + # - name: Move cache + # run: | + # rm -rf /tmp/.buildx-cache + # mv /tmp/.buildx-cache-new /tmp/.buildx-cache - name: Docker Hub Description uses: peter-evans/dockerhub-description@v4 diff --git a/LICENCE b/LICENCE new file mode 100644 index 0000000..b8a6905 --- /dev/null +++ b/LICENCE @@ -0,0 +1,11 @@ +License + +In line with the reuse of luma.core, the software is available under MIT license + +The MIT License (MIT) + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/readme.md b/README.md similarity index 93% rename from readme.md rename to README.md index 0d4b496..a5d1d36 100644 --- a/readme.md +++ b/README.md @@ -1,5 +1,10 @@ [![Docker](https://github.com/JacekZubielik/docker-oled-evo-sabre/actions/workflows/docker-publish-arm.yml/badge.svg)](https://github.com/JacekZubielik/docker-oled-evo-sabre/actions/workflows/docker-publish-arm.yml) + +[![Linter](https://github.com/JacekZubielik/docker-oled-evo-sabre/actions/workflows/lint.yml/badge.svg?branch=dev)](https://github.com/JacekZubielik/docker-oled-evo-sabre/actions/workflows/lint.yml) [![Release](https://github.com/JacekZubielik/docker-oled-evo-sabre/actions/workflows/release.yml/badge.svg?branch=dev)](https://github.com/JacekZubielik/docker-oled-evo-sabre/actions/workflows/release.yml) + + + # SSD1322 OLED - Control and configuration for Audiophonics EvoSabre DAC ## Background