Skip to content

Commit

Permalink
Merge branch 'fullstaq-ruby:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
rus-max authored Jul 15, 2024
2 parents 7ab1d7c + 62aeb93 commit ec541a1
Show file tree
Hide file tree
Showing 5 changed files with 59 additions and 24 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/ci-cd-publish-test-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,24 @@ jobs:

publish:
name: Publish packages
# Ubuntu 22.04 runner has more free disk space than 20.04
runs-on: ubuntu-22.04
# Ubuntu 24.04 runner has more free disk space than 22.04
runs-on: ubuntu-24.04
environment: Production repos
timeout-minutes: 30
permissions:
packages: read
needs:
- determine_necessary_jobs
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Clean disk space
run: ./internal-scripts/ci-cd/publish/clean-disk-space.sh
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
- name: Login to Google Cloud
uses: ./.github/actions/gcloud-login
with:
Expand Down Expand Up @@ -130,9 +136,6 @@ jobs:
# Sets environment variable $LATEST_RELEASE_TAG
run: ./internal-scripts/ci-cd/check-version-numbers-need-changing/determine-latest-release-tag.sh

- name: Free up disk space
run: sudo rm -rf /usr/share/dotnet "$AGENT_TOOLSDIRECTORY"

- name: Upload DEBs to repo
run: ./internal-scripts/ci-cd/publish/publish-debs.rb pkgs/*/*.deb
env:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/ci-cd-publish-test-production.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -68,18 +68,24 @@ jobs:

publish:
name: Publish packages
# Ubuntu 22.04 runner has more free disk space than 20.04
runs-on: ubuntu-22.04
# Ubuntu 24.04 runner has more free disk space than 22.04
runs-on: ubuntu-24.04
environment: Production repos
timeout-minutes: 30
permissions:
packages: read
needs:
- determine_necessary_jobs
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Clean disk space
run: ./internal-scripts/ci-cd/publish/clean-disk-space.sh
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
- name: Login to Google Cloud
uses: ./.github/actions/gcloud-login
with:
Expand Down Expand Up @@ -120,9 +126,6 @@ jobs:
# Sets environment variable $LATEST_RELEASE_TAG
run: ./internal-scripts/ci-cd/check-version-numbers-need-changing/determine-latest-release-tag.sh

- name: Free up disk space
run: sudo rm -rf /usr/share/dotnet "$AGENT_TOOLSDIRECTORY"

- name: Upload DEBs to repo
run: ./internal-scripts/ci-cd/publish/publish-debs.rb pkgs/*/*.deb
env:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/ci-cd-publish-test-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,17 +78,23 @@ jobs:

publish:
name: Publish packages
# Ubuntu 22.04 runner has more free disk space than 20.04
runs-on: ubuntu-22.04
# Ubuntu 24.04 runner has more free disk space than 22.04
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
packages: read
needs:
- determine_necessary_jobs
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Clean disk space
run: ./internal-scripts/ci-cd/publish/clean-disk-space.sh
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
- name: Login to Google Cloud
uses: ./.github/actions/gcloud-login
with:
Expand Down Expand Up @@ -129,9 +135,6 @@ jobs:
# Sets environment variable $LATEST_RELEASE_TAG
run: ./internal-scripts/ci-cd/check-version-numbers-need-changing/determine-latest-release-tag.sh

- name: Free up disk space
run: sudo rm -rf /usr/share/dotnet "$AGENT_TOOLSDIRECTORY"

- name: Upload DEBs to repo
run: ./internal-scripts/ci-cd/publish/publish-debs.rb pkgs/*/*.deb
env:
Expand Down
15 changes: 9 additions & 6 deletions .github/workflows/ci-cd-publish-test-test.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -68,17 +68,23 @@ jobs:

publish:
name: Publish packages
# Ubuntu 22.04 runner has more free disk space than 20.04
runs-on: ubuntu-22.04
# Ubuntu 24.04 runner has more free disk space than 22.04
runs-on: ubuntu-24.04
timeout-minutes: 30
permissions:
packages: read
needs:
- determine_necessary_jobs
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Clean disk space
run: ./internal-scripts/ci-cd/publish/clean-disk-space.sh
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/setup-gcloud@v2'
with:
version: '>= 363.0.0'
- name: Login to Google Cloud
uses: ./.github/actions/gcloud-login
with:
Expand Down Expand Up @@ -119,9 +125,6 @@ jobs:
# Sets environment variable $LATEST_RELEASE_TAG
run: ./internal-scripts/ci-cd/check-version-numbers-need-changing/determine-latest-release-tag.sh

- name: Free up disk space
run: sudo rm -rf /usr/share/dotnet "$AGENT_TOOLSDIRECTORY"

- name: Upload DEBs to repo
run: ./internal-scripts/ci-cd/publish/publish-debs.rb pkgs/*/*.deb
env:
Expand Down
23 changes: 23 additions & 0 deletions internal-scripts/ci-cd/publish/clean-disk-space.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -e

echo "### Free disk space before cleaning:"
df -h

# Based on https://stackoverflow.com/questions/75536771/github-runner-out-of-disk-space-after-building-docker-image
echo
echo "### Cleaning...."
sudo rm -rf "$AGENT_TOOLSDIRECTORY" /usr/share/dotnet /usr/local/lib/android /opt/ghc \
/usr/local/share/powershell /usr/share/swift /usr/local/.ghcup /usr/lib/jvm
sudo apt purge -y aria2 shellcheck zsync google-chrome-stable \
ant ant-optional kubectl mercurial apt-transport-https yarn libssl-dev \
libfreetype6-dev libfontconfig1 snmp pollinate libpq-dev sphinxsearch
sudo apt purge -y '^mysql'
sudo apt purge -y '^php'
sudo apt purge -y '^dotnet'
sudo apt autoremove -y
sudo apt autoclean -y

echo
echo "### Free disk space after cleaning:"
df -h

0 comments on commit ec541a1

Please sign in to comment.