From 1b1ba46bbf0ad804626175b6c8804ed59cd81f47 Mon Sep 17 00:00:00 2001 From: binhex Date: Mon, 14 Jun 2021 12:34:28 +0100 Subject: [PATCH] reduce workflow timeout period --- .../docker-manual-triggered-test.yml | 8 ++--- .../workflows/docker-tag-triggered-prod.yml | 29 ++++++++++++------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/.github/workflows/docker-manual-triggered-test.yml b/.github/workflows/docker-manual-triggered-test.yml index d652dbd..7eefb92 100644 --- a/.github/workflows/docker-manual-triggered-test.yml +++ b/.github/workflows/docker-manual-triggered-test.yml @@ -16,7 +16,7 @@ jobs: - name: Update runc (temporary fix) # TODO: Remove step when https://github.com/actions/virtual-environments/issues/2658 fixed uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 5 max_attempts: 3 retry_wait_seconds: 120 retry_on: error @@ -40,7 +40,7 @@ jobs: - name: Show Runners environment (debug) uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 5 max_attempts: 3 retry_wait_seconds: 120 retry_on: error @@ -61,7 +61,7 @@ jobs: - name: Push Docker image to Docker Hub uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 30 max_attempts: 3 retry_wait_seconds: 120 retry_on: error @@ -70,7 +70,7 @@ jobs: - name: Push Docker image to GitHub Container Registry (GHCR) uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 30 max_attempts: 3 retry_wait_seconds: 120 retry_on: error diff --git a/.github/workflows/docker-tag-triggered-prod.yml b/.github/workflows/docker-tag-triggered-prod.yml index 437c9c3..f6a8835 100644 --- a/.github/workflows/docker-tag-triggered-prod.yml +++ b/.github/workflows/docker-tag-triggered-prod.yml @@ -14,7 +14,7 @@ jobs: - name: Update runc (temporary fix) # TODO: Remove step when https://github.com/actions/virtual-environments/issues/2658 fixed uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 5 max_attempts: 3 retry_wait_seconds: 120 retry_on: error @@ -35,26 +35,26 @@ jobs: registry: ghcr.io username: ${{ github.repository_owner }} password: ${{ secrets.CR_PAT }} - - name: Show Runners environment (debug) + - name: DEBUG Show Runners environment uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 5 max_attempts: 3 retry_wait_seconds: 120 retry_on: error command: | export - name: Identify GitHub tag name + # get tag name from runners environment 'GITHUB_REF' and then use bash substring + # to strip out '+' symbol - required due to gcr not supporting this as a tag + # name (docker hub does support it). + # note if push is NOT triggered by tag then 'GITHUB_REF' will be the branch name. uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 5 max_attempts: 3 retry_wait_seconds: 120 retry_on: error - # get tag name from runners environment 'GITHUB_REF' and then use bash substring - # to strip out '+' symbol - required due to gcr not supporting this as a tag - # name (docker hub does support it). - # note if push is NOT triggered by tag then 'GITHUB_REF' will be the branch name. command: | echo "##[set-output name=tag;]$(tag_name=${GITHUB_REF#refs/tags/} && echo "${tag_name//+/-}")" id: identify_tag @@ -72,10 +72,19 @@ jobs: --tag ghcr.io/${{ github.repository }}:latest \ --tag ghcr.io/${{ github.repository }}:${{ steps.identify_tag.outputs.tag }} \ . + - name: DEBUG Show built Docker Images + uses: nick-invision/retry@v2.4.0 + with: + timeout_minutes: 5 + max_attempts: 3 + retry_wait_seconds: 120 + retry_on: error + command: | + docker images - name: Push Docker image to Docker Hub uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 30 max_attempts: 3 retry_wait_seconds: 120 retry_on: error @@ -85,7 +94,7 @@ jobs: - name: Push Docker image to GitHub Container Registry (GHCR) uses: nick-invision/retry@v2.4.0 with: - timeout_minutes: 60 + timeout_minutes: 30 max_attempts: 3 retry_wait_seconds: 120 retry_on: error