Use hassfest docker image for action #278
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: Test Helpers | |
on: | |
pull_request: | |
branches: ["master"] | |
push: | |
branches: ["master"] | |
jobs: | |
jq: | |
runs-on: ubuntu-latest | |
name: jq | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Test base | |
uses: ./helpers/jq | |
- name: Test with path | |
uses: ./helpers/jq | |
with: | |
path: test_files | |
cas: | |
runs-on: ubuntu-latest | |
name: cas | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Run action | |
uses: ./helpers/cas | |
- name: Verify installation | |
run: | | |
which cas | |
[ -f ~/.cas-trusted-signing-pub-key ] | |
version: | |
runs-on: ubuntu-latest | |
name: version | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Run action | |
id: version | |
uses: ./helpers/version | |
- name: Validate version output | |
run: | | |
echo "${{ steps.version.outputs.version }}"; | |
if [[ '${{ steps.version.outputs.version }}' == '""' ]]; then | |
exit 1 | |
fi | |
- name: Validate stable output | |
run: | | |
echo "${{ steps.version.outputs.stable }}"; | |
if [[ '${{ steps.version.outputs.stable }}' == '"true"' ]]; then | |
exit 1 | |
fi | |
- name: Validate channel output | |
run: | | |
echo "${{ steps.version.outputs.channel }}"; | |
if [[ '${{ steps.version.outputs.channel }}' != '' ]]; then | |
exit 1 | |
fi | |
- name: Validate publish output | |
run: | | |
echo "${{ steps.version.outputs.publish }}"; | |
if [[ '${{ steps.version.outputs.publish }}' == '"true"' ]]; then | |
exit 1 | |
fi | |
info: | |
runs-on: ubuntu-latest | |
name: info | |
strategy: | |
fail-fast: False | |
matrix: | |
file: | |
- "build" | |
- "config" | |
type: | |
- "json" | |
- "yaml" | |
steps: | |
- name: Check out the repository | |
uses: actions/checkout@v4 | |
- name: Test | |
uses: ./helpers/info | |
id: info | |
with: | |
path: "test_files/${{ matrix.file }}_${{ matrix.type }}" | |
- name: Validate architectures | |
run: | | |
if [[ '${{ steps.info.outputs.architectures }}' != '["aarch64","armv7","armhf","amd64","i386"]' ]]; then | |
exit 1 | |
fi | |
- name: Validate image | |
if: matrix.file == 'config' | |
run: | | |
if [[ '${{ steps.info.outputs.image }}' != '"ghcr.io/example/{arch}-example"' ]]; then | |
exit 1 | |
fi | |
- name: Validate version | |
if: matrix.file == 'config' | |
run: | | |
if [[ '${{ steps.info.outputs.version }}' != '"1.0.0"' ]]; then | |
exit 1 | |
fi |