Skip to content

Commit

Permalink
more linter fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
jens-maus committed Nov 14, 2024
1 parent 8b952c4 commit be036c3
Showing 1 changed file with 64 additions and 64 deletions.
128 changes: 64 additions & 64 deletions .github/workflows/build-proxy.yml
Original file line number Diff line number Diff line change
@@ -1,64 +1,64 @@
---
name: Build-Proxy

on:
workflow_dispatch:
inputs:
type:
description: 'Type (edge/proxy)'
default: 'proxy'
required: true

jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }} ${{ matrix.addon }} add-on
strategy:
matrix:
addon: ["home-assistant-addon-proxy"]
arch: ["aarch64", "amd64", "armhf", "armv7", "i386"]

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Get information
id: info
uses: home-assistant/actions/helpers/info@master
with:
path: "./${{ matrix.addon }}"

- name: Check if add-on should be built
id: check
run: |
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then
echo "build_arch=true" >> $GITHUB_OUTPUT;
echo "image=$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)" >> $GITHUB_OUTPUT;
if [[ -z "${{ github.head_ref }}" ]] && [[ "${{ github.event_name }}" == "push" ]]; then
echo "BUILD_ARGS=" >> $GITHUB_ENV;
fi
else
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build";
echo "build_arch=false" >> $GITHUB_OUTPUT;
fi
#- name: Login to GitHub Container Registry
# if: env.BUILD_ARGS != '--test'
# uses: docker/[email protected]
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/[email protected]
with:
args: |
${{ env.BUILD_ARGS }} \
--test \
--${{ matrix.arch }} \
--target /data/${{ matrix.addon }} \
--image "${{ steps.check.outputs.image }}" \
--docker-hub "ghcr.io/${{ github.repository_owner }}" \
--addon
---
name: Build-Proxy

on:

Check warning on line 4 in .github/workflows/build-proxy.yml

View workflow job for this annotation

GitHub Actions / Linter Checks

truthy value should be one of [false, true]
workflow_dispatch:
inputs:
type:
description: 'Type (edge/proxy)'
default: 'proxy'
required: true

jobs:
build:
runs-on: ubuntu-latest
name: Build ${{ matrix.arch }} ${{ matrix.addon }} add-on
strategy:
matrix:
addon: ["home-assistant-addon-proxy"]
arch: ["aarch64", "amd64", "armhf", "armv7", "i386"]

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Get information
id: info
uses: home-assistant/actions/helpers/info@master
with:
path: "./${{ matrix.addon }}"

- name: Check if add-on should be built
id: check
run: |
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then
echo "build_arch=true" >> $GITHUB_OUTPUT;
echo "image=$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)" >> $GITHUB_OUTPUT;
if [[ -z "${{ github.head_ref }}" ]] && [[ "${{ github.event_name }}" == "push" ]]; then
echo "BUILD_ARGS=" >> $GITHUB_ENV;
fi
else
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build";
echo "build_arch=false" >> $GITHUB_OUTPUT;
fi
# - name: Login to GitHub Container Registry
# if: env.BUILD_ARGS != '--test'
# uses: docker/[email protected]
# with:
# registry: ghcr.io
# username: ${{ github.repository_owner }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Build ${{ matrix.addon }} add-on
if: steps.check.outputs.build_arch == 'true'
uses: home-assistant/[email protected]
with:
args: |
${{ env.BUILD_ARGS }} \
--test \
--${{ matrix.arch }} \
--target /data/${{ matrix.addon }} \
--image "${{ steps.check.outputs.image }}" \
--docker-hub "ghcr.io/${{ github.repository_owner }}" \
--addon

0 comments on commit be036c3

Please sign in to comment.