fix: ensure that dnschallengealias has a default value #8
Workflow file for this run
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
name: Builder | |
env: | |
BUILD_ARGS: "--test" | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'acme-sh/**' | |
- '!acme-sh/CHANGELOG.md' | |
pull_request: | |
branches: | |
- main | |
paths: | |
- 'acme-sh/**' | |
- '!acme-sh/CHANGELOG.md' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
name: Build acme.sh addon for ${{ matrix.arch }} | |
strategy: | |
matrix: | |
arch: ["aarch64", "amd64", "armhf", "armv7", "i386"] | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4.1.4 | |
- name: Get information | |
id: info | |
uses: home-assistant/actions/helpers/info@master | |
with: | |
path: "./acme-sh" | |
- name: Check if add-on should be built | |
id: check | |
run: | | |
if [[ "${{ steps.info.outputs.image }}" == "null" ]]; then | |
echo "Image property is not defined, skipping build" | |
echo "build_arch=false" >> $GITHUB_OUTPUT; | |
elif [[ "${{ 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, skipping build"; | |
echo "build_arch=false" >> $GITHUB_OUTPUT; | |
fi | |
- name: Login to GitHub Container Registry | |
if: env.BUILD_ARGS != '--test' | |
uses: docker/login-action@v3.1.0 | |
with: | |
registry: ghcr.io | |
username: ${{ github.repository_owner }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build add-on | |
if: steps.check.outputs.build_arch == 'true' | |
uses: home-assistant/builder@2024.03.5 | |
with: | |
args: | | |
${{ env.BUILD_ARGS }} \ | |
--${{ matrix.arch }} \ | |
--target /data/acme-sh \ | |
--image "${{ steps.check.outputs.image }}" \ | |
--docker-hub "ghcr.io/${{ github.repository_owner }}" \ | |
--addon |