Skip to content

⬆️ Update Add-on base image #763

⬆️ Update Add-on base image

⬆️ Update Add-on base image #763

Workflow file for this run

---
name: CI
# yamllint disable-line rule:truthy
on:
push:
pull_request:
types:
- opened
- reopened
# - synchronize
workflow_dispatch:
jobs:
workflows:
uses: hassio-addons/workflows/.github/workflows/addon-ci.yaml@main
with:
slug: "grott"
check_image:
runs-on: ubuntu-latest

Check failure on line 21 in .github/workflows/ci.yaml

View workflow run for this annotation

GitHub Actions / CI

Invalid workflow file

The workflow is not valid. hassio-addons/workflows/.github/workflows/addon-ci.yaml@main (Line: 21, Col: 3): Error calling workflow 'hassio-addons/workflows/.github/workflows/app-ci.yaml@89d2451c070672ffc30bcc69b08a18f79b180510'. The nested job 'update_release_draft' is requesting 'contents: write, pull-requests: read', but is only allowed 'contents: read, pull-requests: none'.
needs: workflows
steps:
- name: ⤵️ Check out code from GitHub
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: 🚀 Run add-on information action
id: information
uses: frenck/action-addon-information@v1.4.2
- name: 🚀 Process possible slug override
id: override
run: |
slug="${{ steps.information.outputs.slug }}"
if [[ ! -z "${{ inputs.slug }}" ]]; then
slug="${{ inputs.slug }}"
fi
echo "slug=$slug" >> "$GITHUB_OUTPUT"
- name: ℹ️ Gather version and environment
id: release
run: |
sha="${{ github.sha }}"
environment="edge"
version="${sha:0:7}"
echo "environment=${environment}" >> "$GITHUB_OUTPUT"
echo "version=${version}" >> "$GITHUB_OUTPUT"
- name: 🏗 Set up build cache
id: cache
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: /tmp/.docker-cache
key: docker-amd64-${{ github.sha }}
restore-keys: |
docker-amd64
- name: 🏗 Set up QEMU
uses: docker/setup-qemu-action@ce360397dd3f832beb865e1373c09c0e9f86d70a # v4.0.0
- name: 🏗 Set up Docker Buildx
uses: docker/setup-buildx-action@4d04d5d9486b7bd6fa91e7baf45bbb4f8b9deedd # v4.0.0
- name: 🏗 Login to GitHub Container Registry
uses: docker/login-action@4907a6ddec9925e35a0a9e82d7399ccc52663121 # v4.1.0
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: ℹ️ Compose build flags
id: flags
run: |
echo "date=$(date +"%Y-%m-%dT%H:%M:%SZ")" >> "$GITHUB_OUTPUT"
from=$(yq --no-colors eval ".build_from.amd64" "${{ steps.information.outputs.build }}")
echo "from=${from}" >> "$GITHUB_OUTPUT"
echo "${from}"
- name: 🚀 Build
uses: docker/build-push-action@v6.19.2
with:
load: true
tags: |
${{ github.repository_owner }}/${{ steps.information.outputs.slug }}/amd64:${{ steps.release.outputs.version }}
context: ${{ steps.information.outputs.target }}
file: ${{steps.information.outputs.target }}/Dockerfile
cache-from: |
type=local,src=/tmp/.docker-cache
ghcr.io/${{ github.repository_owner }}/${{ needs.information.outputs.slug }}/${{ matrix.architecture }}:edge
cache-to: type=local,mode=max,dest=/tmp/.docker-cache
platforms: ${{ steps.flags.outputs.platform }}
build-args: |
BUILD_ARCH=amd64
BUILD_DATE=${{ steps.flags.outputs.date }}
BUILD_FROM=${{ steps.flags.outputs.from }}
BUILD_REF=${{ github.sha }}
BUILD_REPOSITORY=${{ github.repository }}
BUILD_VERSION=dev
# install goss and dgoss
- name: Install pytest-testinfra
run: |
pip install uv
uv virtualenv
uv pip install -r requirements.txt
# run goss tests
- name: Run testinfra
run: |
. .venv/bin/activate
pytest --image "${{ github.repository_owner }}/${{ steps.information.outputs.slug }}/amd64:${{ steps.release.outputs.version }}"