mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-01 05:14:04 +02:00
Implement retry logic for add-on build process
Added a retry mechanism for building the add-on in case of failure, with a wait time of 3 minutes before the second attempt.
This commit is contained in:
23
.github/workflows/onpush_builder.yaml
vendored
23
.github/workflows/onpush_builder.yaml
vendored
@@ -170,9 +170,28 @@ jobs:
|
|||||||
registry: ghcr.io
|
registry: ghcr.io
|
||||||
username: ${{ github.repository_owner }}
|
username: ${{ github.repository_owner }}
|
||||||
password: ${{ secrets.GITHUB_TOKEN }}
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Build ${{ matrix.addon }} add-on
|
- name: Build ${{ matrix.addon }} add-on (attempt 1)
|
||||||
id: builderstep
|
id: builderstep1
|
||||||
if: steps.check.outputs.build_arch == 'true' && steps.dockerfile_check.outputs.has_dockerfile == 'true'
|
if: steps.check.outputs.build_arch == 'true' && steps.dockerfile_check.outputs.has_dockerfile == 'true'
|
||||||
|
continue-on-error: true
|
||||||
|
uses: home-assistant/builder@2025.11.0
|
||||||
|
env:
|
||||||
|
CAS_API_KEY: ${{ secrets.CAS_API_KEY }}
|
||||||
|
with:
|
||||||
|
args: |
|
||||||
|
${{ env.BUILD_ARGS }} \
|
||||||
|
--${{ matrix.arch }} \
|
||||||
|
--target "/data/${{ matrix.addon }}" \
|
||||||
|
--image "${{ steps.check.outputs.image }}" \
|
||||||
|
--docker-hub "ghcr.io/${{ github.repository_owner }}" \
|
||||||
|
--addon
|
||||||
|
|
||||||
|
- name: Wait 3 minutes before retry
|
||||||
|
if: steps.check.outputs.build_arch == 'true' && steps.dockerfile_check.outputs.has_dockerfile == 'true' && steps.builderstep1.outcome == 'failure'
|
||||||
|
run: sleep 180
|
||||||
|
|
||||||
|
- name: Build ${{ matrix.addon }} add-on (attempt 2)
|
||||||
|
if: steps.check.outputs.build_arch == 'true' && steps.dockerfile_check.outputs.has_dockerfile == 'true' && steps.builderstep1.outcome == 'failure'
|
||||||
uses: home-assistant/builder@2025.11.0
|
uses: home-assistant/builder@2025.11.0
|
||||||
env:
|
env:
|
||||||
CAS_API_KEY: ${{ secrets.CAS_API_KEY }}
|
CAS_API_KEY: ${{ secrets.CAS_API_KEY }}
|
||||||
|
|||||||
Reference in New Issue
Block a user