chore(main): release tempo 1.1.1 #150
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# yamllint disable rule:line-length | |
# shellcheck disable=SC2043 | |
--- | |
name: PR Check Build | |
on: | |
pull_request: | |
branches: | |
- main | |
concurrency: | |
cancel-in-progress: true | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number }} | |
jobs: | |
check-addon-changes: | |
runs-on: ubuntu-latest | |
outputs: | |
changedAddons: ${{ steps.filter.outputs.changes }} | |
changedChangelogFiles: ${{ steps.changed-files.outputs.changelogs_files }} | |
steps: | |
- name: ↩️ Checkout | |
uses: actions/checkout@v4 | |
- name: 📂 Detect changed addons | |
uses: dorny/paths-filter@v3 | |
id: filter | |
with: | |
filters: .github/path-filters.yaml | |
- name: 📂 Detect chanced files | |
uses: dorny/paths-filter@v3 | |
id: changed-files | |
with: | |
list-files: csv | |
filters: | | |
changelogs: | |
- '**/CHANGELOG.md' | |
addon-linter: | |
name: Addon linting | |
if: ${{ needs.check-addon-changes.outputs.changedAddons != '[]' }} | |
runs-on: ubuntu-latest | |
needs: check-addon-changes | |
strategy: | |
fail-fast: false | |
matrix: | |
addon: ${{ fromJSON(needs.check-addon-changes.outputs.changedAddons) }} | |
steps: | |
- name: ↩️ Checkout | |
uses: actions/checkout@v4 | |
- name: 🔎 Run Home Assistant Add-on Lint | |
uses: frenck/action-addon-linter@v2 | |
with: | |
path: "./${{ matrix.addon }}" | |
build: | |
name: Test build | |
if: ${{ needs.check-addon-changes.outputs.changedAddons != '[]' }} | |
needs: check-addon-changes | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
addon: ${{ fromJSON(needs.check-addon-changes.outputs.changedAddons) }} | |
arch: | |
- "aarch64" | |
- "amd64" | |
- "armv7" | |
- "i386" | |
steps: | |
- name: Checkout the 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 | |
env: | |
HEAD: "${{ github.head_ref }}" | |
run: | | |
# shellcheck disable=SC2157,SC2086 | |
if [[ "${{ steps.info.outputs.architectures }}" =~ ${{ matrix.arch }} ]]; then | |
# shellcheck disable=SC2129 | |
echo "build_arch=true" >> $GITHUB_OUTPUT; | |
# shellcheck disable=SC2129 | |
echo "image=$(echo ${{ steps.info.outputs.image }} | cut -d'/' -f3)" >> $GITHUB_OUTPUT; | |
if [[ -z "$HEAD" ]] && [[ "${{ github.event_name }}" == "push" ]]; then | |
# shellcheck disable=SC2129 | |
echo "BUILD_ARGS=" >> $GITHUB_ENV; | |
fi | |
else | |
echo "${{ matrix.arch }} is not a valid arch for ${{ matrix.addon }}, skipping build"; | |
# shellcheck disable=SC2129 | |
echo "build_arch=false" >> $GITHUB_OUTPUT; | |
fi | |
- name: Build ${{ matrix.addon }} add-on | |
if: steps.check.outputs.build_arch == 'true' | |
uses: home-assistant/builder@master | |
with: | |
args: | | |
--test \ | |
--${{ matrix.arch }} \ | |
--target /data/${{ matrix.addon }} \ | |
--image "${{ steps.check.outputs.image }}" \ | |
--docker-hub "ghcr.io/${{ github.repository_owner }}" \ | |
--addon |