Skip to content

Commit

Permalink
tweak timeouts
Browse files Browse the repository at this point in the history
Signed-off-by: AtomicFS <[email protected]>
  • Loading branch information
AtomicFS committed Sep 24, 2024
1 parent a7601cc commit f150e1f
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/docker-build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,28 +100,29 @@ jobs:
run: pip install -r ./.dagger-ci/daggerci/requirements.txt

- name: Define default timeout
run: echo "DAGGER_TIMEOUT=15m" >> "${GITHUB_ENV}"
run: echo "DAGGER_TIMEOUT=15" >> "${GITHUB_ENV}"
- name: Define timeout if coreboot container
if: ${{ startsWith(matrix.dockerfile, 'coreboot_') }}
run: echo "DAGGER_TIMEOUT=120m" >> "${GITHUB_ENV}"
run: echo "DAGGER_TIMEOUT=120" >> "${GITHUB_ENV}"
- name: Define timeout if edk2 container
if: ${{ startsWith(matrix.dockerfile, 'edk2-stable') || startsWith(matrix.dockerfile, 'udk20') }}
run: echo "DAGGER_TIMEOUT=15m" >> "${GITHUB_ENV}"
run: echo "DAGGER_TIMEOUT=15" >> "${GITHUB_ENV}"
- name: Define timeout if linux container
if: ${{ startsWith(matrix.dockerfile, 'linux_') }}
run: echo "DAGGER_TIMEOUT=15m" >> "${GITHUB_ENV}"
run: echo "DAGGER_TIMEOUT=15" >> "${GITHUB_ENV}"
- name: Define timeout if uroot container
if: ${{ startsWith(matrix.dockerfile, 'uroot_') }}
run: echo "DAGGER_TIMEOUT=10m" >> "${GITHUB_ENV}"
run: echo "DAGGER_TIMEOUT=10" >> "${GITHUB_ENV}"

- name: Run dagger pipeline
timeout-minutes: ${{ env.DAGGER_TIMEOUT }}
run: |
if [[ "${GITHUB_EVENT_NAME}" == 'release' ]] || [[ "${GITHUB_REF}" == *'main' ]] || [[ "${GITHUB_REF_TYPE}" == 'tag' ]]; then
echo "Enable publishing"
timeout "${DAGGER_TIMEOUT}" python .dagger-ci/daggerci/main.py -d ${{ matrix.dockerfile }} --publish
python .dagger-ci/daggerci/main.py -d ${{ matrix.dockerfile }} --publish
else
echo "Disable publishing"
timeout "${DAGGER_TIMEOUT}" python .dagger-ci/daggerci/main.py -d ${{ matrix.dockerfile }}
python .dagger-ci/daggerci/main.py -d ${{ matrix.dockerfile }}
fi
shell: bash
env:
Expand Down

0 comments on commit f150e1f

Please sign in to comment.