Workflow tweak for HA config.
Home Assistant & Miscellaneous Deployment / Check and Create PR (push) Successful in 13s
Home Assistant & Miscellaneous Deployment / Docker Compose Dry Run (push) Failing after 54s
Home Assistant & Miscellaneous Deployment / Home Assistant Configuration Check (push) Has been cancelled
Home Assistant & Miscellaneous Deployment / Check and Create PR (push) Successful in 13s
Home Assistant & Miscellaneous Deployment / Docker Compose Dry Run (push) Failing after 54s
Home Assistant & Miscellaneous Deployment / Home Assistant Configuration Check (push) Has been cancelled
This commit is contained in:
@@ -72,22 +72,37 @@ jobs:
|
|||||||
uses: actions/setup-python@v5
|
uses: actions/setup-python@v5
|
||||||
with:
|
with:
|
||||||
python-version: '3.13.2'
|
python-version: '3.13.2'
|
||||||
|
- name: Gotify Notification
|
||||||
|
uses: eikendev/gotify-action@master
|
||||||
|
with:
|
||||||
|
gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
||||||
|
gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
||||||
|
notification_title: 'GITEA: Home Assistant Config Check'
|
||||||
|
notification_message: 'Setting up Python >=3.13 and venv...'
|
||||||
- name: Create virtual environment and install Home Assistant
|
- name: Create virtual environment and install Home Assistant
|
||||||
run: |
|
run: |
|
||||||
python -m venv venv
|
python -m venv venv
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
python -m pip install --upgrade pip
|
python -m pip install --upgrade pip
|
||||||
pip install homeassistant==2025.8.3
|
pip install homeassistant==2025.8.3
|
||||||
|
- name: Gotify Notification
|
||||||
|
uses: eikendev/gotify-action@master
|
||||||
|
with:
|
||||||
|
gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
||||||
|
gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
||||||
|
notification_title: 'GITEA: Home Assistant Config Check'
|
||||||
|
notification_message: 'Starting config check...'
|
||||||
- name: Run Home Assistant config check
|
- name: Run Home Assistant config check
|
||||||
run: |
|
run: |
|
||||||
source venv/bin/activate
|
source venv/bin/activate
|
||||||
hass --config ansible/configs/homeassistant --script check_config | tee ha-check.log
|
hass --config ansible/configs/homeassistant --script check_config | tee ha-check.log
|
||||||
- name: Upload config check log
|
- name: Gotify Notification
|
||||||
if: always()
|
uses: eikendev/gotify-action@master
|
||||||
uses: actions/upload-artifact@v4
|
|
||||||
with:
|
with:
|
||||||
name: homeassistant-check-log
|
gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
||||||
path: ha-check.log
|
gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
||||||
|
notification_title: 'GITEA: Home Assistant Config Check'
|
||||||
|
notification_message: '🚀 Config check done!'
|
||||||
# generate-service-list:
|
# generate-service-list:
|
||||||
# name: Generate list of added/modified/deleted services
|
# name: Generate list of added/modified/deleted services
|
||||||
# runs-on: ubuntu-latest
|
# runs-on: ubuntu-latest
|
||||||
@@ -100,13 +115,13 @@ jobs:
|
|||||||
# - name: Fetch base branch
|
# - name: Fetch base branch
|
||||||
# run: |
|
# run: |
|
||||||
# git fetch origin ${{ github.event.pull_request.base.ref }}
|
# git fetch origin ${{ github.event.pull_request.base.ref }}
|
||||||
# - name: Gotify Notification
|
# - name: Gotify Notification
|
||||||
# uses: eikendev/gotify-action@master
|
# uses: eikendev/gotify-action@master
|
||||||
# with:
|
# with:
|
||||||
# gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
# gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
||||||
# gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
# gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
||||||
# notification_title: 'GITEA: Services TBD'
|
# notification_title: 'GITEA: Services TBD'
|
||||||
# notification_message: 'Generating list of services to deploy...'
|
# notification_message: 'Generating list of services to deploy...'
|
||||||
# - name: Save both versions of docker-compose.yml
|
# - name: Save both versions of docker-compose.yml
|
||||||
# run: |
|
# run: |
|
||||||
# git show origin/main:docker-compose.yml > docker-compose-main.yml || touch docker-compose-main.yml
|
# git show origin/main:docker-compose.yml > docker-compose-main.yml || touch docker-compose-main.yml
|
||||||
@@ -143,59 +158,59 @@ jobs:
|
|||||||
# - name: List of Services for (Re)Deployment
|
# - name: List of Services for (Re)Deployment
|
||||||
# run: |
|
# run: |
|
||||||
# echo -e "${{ steps.detect_services.outputs.docker_svc_list }}"
|
# echo -e "${{ steps.detect_services.outputs.docker_svc_list }}"
|
||||||
# docker-compose-dry-run:
|
docker-compose-dry-run:
|
||||||
# name: Docker Compose Dry Run
|
name: Docker Compose Dry Run
|
||||||
# needs: [generate-service-list]
|
needs: [generate-service-list]
|
||||||
# runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
# env:
|
env:
|
||||||
# VAULT_ADDR: ${{ secrets.RIKKU_VAULT_ADDR }}
|
VAULT_ADDR: ${{ secrets.RIKKU_VAULT_ADDR }}
|
||||||
# VAULT_TOKEN: ${{ secrets.VAULT_GITEA_TOKEN }}
|
VAULT_TOKEN: ${{ secrets.VAULT_GITEA_TOKEN }}
|
||||||
# VAULT_NAMESPACE: ""
|
VAULT_NAMESPACE: ""
|
||||||
# RIKKU_REGISTRY_PASSWORD: ${{ secrets.BOT_GITEA_PASSWORD }}
|
RIKKU_REGISTRY_PASSWORD: ${{ secrets.BOT_GITEA_PASSWORD }}
|
||||||
# DOCKER_SVC_LIST: ${{ needs.generate-service-list.outputs.svc_deploy_list }}
|
DOCKER_SVC_LIST: ${{ needs.generate-service-list.outputs.svc_deploy_list }}
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout
|
- name: Checkout
|
||||||
# uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
# - name: Login to Gitea Container Registry
|
- name: Login to Gitea Container Registry
|
||||||
# run: |
|
run: |
|
||||||
# docker login -u gitea-sonarqube-bot -p ${RIKKU_REGISTRY_PASSWORD} git.trez.wtf
|
docker login -u gitea-sonarqube-bot -p ${RIKKU_REGISTRY_PASSWORD} git.trez.wtf
|
||||||
# - name: Cache Vault install
|
- name: Cache Vault install
|
||||||
# id: cache-vault
|
id: cache-vault
|
||||||
# uses: actions/cache@v4
|
uses: actions/cache@v4
|
||||||
# with:
|
with:
|
||||||
# path: /opt/hostedtoolcache/vault/${{ env.HC_VAULT_VERSION }}/x64
|
path: /opt/hostedtoolcache/vault/${{ env.HC_VAULT_VERSION }}/x64
|
||||||
# key: vault-${{ runner.os }}-${{ env.HC_VAULT_VERSION }}
|
key: vault-${{ runner.os }}-${{ env.HC_VAULT_VERSION }}
|
||||||
# - name: Install Vault (only if not cached)
|
- name: Install Vault (only if not cached)
|
||||||
# if: steps.cache-vault.outputs.cache-hit != 'true'
|
if: steps.cache-vault.outputs.cache-hit != 'true'
|
||||||
# uses: cpanato/vault-installer@main
|
uses: cpanato/vault-installer@main
|
||||||
# with:
|
with:
|
||||||
# version: ${{ env.HC_VAULT_VERSION }}
|
version: ${{ env.HC_VAULT_VERSION }}
|
||||||
# - name: Gotify Notification
|
- name: Gotify Notification
|
||||||
# uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
# with:
|
with:
|
||||||
# gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
||||||
# gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
||||||
# notification_title: 'GITEA: Docker Compose Dry Run @ Rinoa'
|
notification_title: 'GITEA: Docker Compose Dry Run @ Rinoa'
|
||||||
# notification_message: 'Starting Docker Compose dry run...'
|
notification_message: 'Starting Docker Compose dry run...'
|
||||||
# - name: Generate .env file for Docker Compose
|
- name: Generate .env file for Docker Compose
|
||||||
# run: |
|
run: |
|
||||||
# vault kv get -format=json rikku-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env
|
vault kv get -format=json rikku-docker/env | jq -r '.data.data' | jq -r 'keys[] as $k | "\($k)='\''\(.[$k])'\''"' > .env
|
||||||
# echo ${DOCKER_SVC_LIST}
|
echo ${DOCKER_SVC_LIST}
|
||||||
# - name: Docker Compose Dry Run
|
- name: Docker Compose Dry Run
|
||||||
# uses: astappiev/docker-compose-remote-action@master
|
uses: astappiev/docker-compose-remote-action@master
|
||||||
# with:
|
with:
|
||||||
# ssh_user: pi
|
ssh_user: pi
|
||||||
# ssh_host: 192.168.1.252
|
ssh_host: 192.168.1.252
|
||||||
# ssh_private_key: ${RIKKU_SSH_PRIVATE_KEY}
|
ssh_private_key: ${RIKKU_SSH_PRIVATE_KEY}
|
||||||
# ssh_host_public_key: ${RIKKU_SSH_PUBLIC_KEY}
|
ssh_host_public_key: ${RIKKU_SSH_PUBLIC_KEY}
|
||||||
# docker_args: -d --remove-orphans --build ${DOCKER_SVC_LIST}
|
docker_args: -d --remove-orphans --build ${DOCKER_SVC_LIST}
|
||||||
# - name: Gotify Notification
|
- name: Gotify Notification
|
||||||
# uses: eikendev/gotify-action@master
|
uses: eikendev/gotify-action@master
|
||||||
# with:
|
with:
|
||||||
# gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
gotify_api_base: '${{ secrets.RIKKU_GOTIFY_URL }}'
|
||||||
# gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
gotify_app_token: '${{ secrets.RIKKU_RUNNER_GOTIFY_TOKEN }}'
|
||||||
# notification_title: 'GITEA: Docker Compose Dry Run @ Rinoa'
|
notification_title: 'GITEA: Docker Compose Dry Run @ Rinoa'
|
||||||
# notification_message: 'Docker Compose dry run completed successfully.'
|
notification_message: 'Docker Compose dry run completed successfully.'
|
||||||
# pr-merge:
|
# pr-merge:
|
||||||
# name: PR Merge
|
# name: PR Merge
|
||||||
# needs: [regenerate-readme-modified-services]
|
# needs: [regenerate-readme-modified-services]
|
||||||
|
|||||||
Reference in New Issue
Block a user