Skip to content

Commit

Permalink
Add a condition disk clean-up step to reclaim some disk space in pr-c…
Browse files Browse the repository at this point in the history
…omment-trigger & provider-ci reusable workflows

Signed-off-by: Alper Rifat Ulucinar <[email protected]>
  • Loading branch information
ulucinar committed Mar 7, 2024
1 parent dadbbf7 commit fa17907
Show file tree
Hide file tree
Showing 2 changed files with 56 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/pr-comment-trigger.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ on:
default: 'provider'
required: false
type: string
cleanup-disk:
description: "If set to true, an initial step will be run to reclaim some extra disk space for the uptest job in this workflow"
required: false
type: boolean
default: false
update-test-parameter:
description: 'Input parameter to use during update step. If this field
is empty, then the update step will be skipped.
Expand Down Expand Up @@ -113,6 +118,7 @@ jobs:
steps:
- name: Cleanup Disk
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
if: ${{ inputs.cleanup-disk }}
with:
android: true
dotnet: true
Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/provider-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,11 @@ on:
default: '1.20'
required: false
type: string
cleanup-disk:
description: "If set to true, an initial step will be run to reclaim some extra disk space for the build/test jobs in this workflow"
required: false
type: boolean
default: false
golangci-version:
description: 'The version string to be used with the golangci-lint action'
default: 'v1.55.2'
Expand Down Expand Up @@ -78,6 +83,17 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Cleanup Disk
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
if: ${{ inputs.cleanup-disk }}
with:
android: true
dotnet: true
haskell: true
tool-cache: true
large-packages: false
swap-storage: false

- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
Expand Down Expand Up @@ -131,6 +147,17 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Cleanup Disk
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
if: ${{ inputs.cleanup-disk }}
with:
android: true
dotnet: true
haskell: true
tool-cache: true
large-packages: false
swap-storage: false

- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
Expand Down Expand Up @@ -197,6 +224,17 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Cleanup Disk
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
if: ${{ inputs.cleanup-disk }}
with:
android: true
dotnet: true
haskell: true
tool-cache: true
large-packages: false
swap-storage: false

- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
Expand Down Expand Up @@ -248,6 +286,17 @@ jobs:
if: needs.detect-noop.outputs.noop != 'true'

steps:
- name: Cleanup Disk
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
if: ${{ inputs.cleanup-disk }}
with:
android: true
dotnet: true
haskell: true
tool-cache: true
large-packages: false
swap-storage: false

- name: Checkout
uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4
with:
Expand Down Expand Up @@ -295,6 +344,7 @@ jobs:
steps:
- name: Cleanup Disk
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
if: ${{ inputs.cleanup-disk }}
with:
android: true
dotnet: true
Expand Down

0 comments on commit fa17907

Please sign in to comment.