mirror of
https://github.com/hassio-addons/workflows.git
synced 2025-05-07 04:21:27 +00:00
⬆️ Fix CI/CD workflows to use contains
for architecture checks (#200)
This commit is contained in:
parent
b0d43678f7
commit
f481645b08
4 changed files with 6 additions and 5 deletions
2
.github/workflows/addon-ci.yaml
vendored
2
.github/workflows/addon-ci.yaml
vendored
|
@ -122,7 +122,7 @@ jobs:
|
|||
- lint-prettier
|
||||
- lint-shellcheck
|
||||
- lint-yamllint
|
||||
runs-on: ${{ matrix.architecture in ['armhf', 'armv7', 'aarch64'] && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||
runs-on: ${{ contains(fromJson('["armhf", "armv7", "aarch64"]'), matrix.architecture) && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: ${{ fromJson(needs.information.outputs.architectures) }}
|
||||
|
|
5
.github/workflows/addon-deploy.yaml
vendored
5
.github/workflows/addon-deploy.yaml
vendored
|
@ -88,7 +88,7 @@ jobs:
|
|||
deploy:
|
||||
name: 👷 Build & Deploy ${{ matrix.architecture }}
|
||||
needs: information
|
||||
runs-on: ${{ matrix.architecture in ['armhf', 'armv7', 'aarch64'] && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||
runs-on: ${{ contains(fromJson('["armhf", "armv7", "aarch64"]'), matrix.architecture) && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: ${{ fromJson(needs.information.outputs.architectures) }}
|
||||
|
@ -124,9 +124,10 @@ jobs:
|
|||
echo "platform=linux/arm/v7" >> "$GITHUB_OUTPUT"
|
||||
elif [[ "${{ matrix.architecture }}" = "aarch64" ]]; then
|
||||
echo "platform=linux/arm64/v8" >> "$GITHUB_OUTPUT"
|
||||
else:
|
||||
else
|
||||
echo "::error ::Could not determine platform for architecture ${{ matrix.architecture }}"
|
||||
exit 1
|
||||
fi
|
||||
- name: 🏗 Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3.3.0
|
||||
with:
|
||||
|
|
2
.github/workflows/base-ci.yaml
vendored
2
.github/workflows/base-ci.yaml
vendored
|
@ -106,7 +106,7 @@ jobs:
|
|||
- lint-prettier
|
||||
- lint-shellcheck
|
||||
- lint-yamllint
|
||||
runs-on: ${{ matrix.architecture in ['armhf', 'armv7', 'aarch64'] && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||
runs-on: ${{ contains(fromJson('["armhf", "armv7", "aarch64"]'), matrix.architecture) && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: ${{ fromJson(needs.information.outputs.architectures) }}
|
||||
|
|
2
.github/workflows/base-deploy.yaml
vendored
2
.github/workflows/base-deploy.yaml
vendored
|
@ -54,7 +54,7 @@ jobs:
|
|||
deploy:
|
||||
name: 👷 Build & Deploy ${{ matrix.architecture }}
|
||||
needs: information
|
||||
runs-on: ${{ matrix.architecture in ['armhf', 'armv7', 'aarch64'] && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||
runs-on: ${{ contains(fromJson('["armhf", "armv7", "aarch64"]'), matrix.architecture) && 'ubuntu-24.04-arm' || 'ubuntu-latest' }}
|
||||
strategy:
|
||||
matrix:
|
||||
architecture: ${{ fromJson(needs.information.outputs.architectures) }}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue