Skip to content

Commit

Permalink
Fix No space left on device when creating a self-extracting archive
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeniy-antonyuk committed Nov 24, 2024
1 parent 5fbbeb2 commit d305db8
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions .github/workflows/ci-oci-docker-install.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Install OneClickInstall Docker

on:
push:
branches:
- bugfix/disk-space
pull_request:
types: [opened, reopened, synchronize]
paths:
Expand All @@ -11,7 +14,7 @@ on:
offline:
description: 'Publish 4testing offline archive'
required: true
default: false
default: true
type: boolean

jobs:
Expand All @@ -21,7 +24,7 @@ jobs:
- name: Determine Branch Name
run: |
BRANCH_NAME=$([ "${{ github.event_name }}" = "pull_request" ] && echo "${{ github.event.pull_request.head.ref }}" || echo "${GITHUB_REF#refs/heads/}")
echo "BRANCH_NAME=${BRANCH_NAME:-master}" >> $GITHUB_ENV
echo "BRANCH_NAME=master" >> $GITHUB_ENV
- name: Free Disk Space
run: |
Expand Down Expand Up @@ -67,19 +70,16 @@ jobs:
esac
- name: Checkout repository
if: ${{ github.event.inputs.offline == 'true' }}
uses: actions/checkout@v4
with:
ref: ${{ env.BRANCH_NAME }}

- name: Free Disk Space
if: ${{ github.event.inputs.offline == 'true' }}
run: |
docker stop $(docker ps -a -q) && docker rm $(docker ps -a -q) && docker volume rm $(docker volume ls -q)
sudo rm -rf /usr/local/lib/android /opt/ghc
sudo rm -rf /usr/local/lib/android /opt/ghc /usr/share/swift /usr/share/miniconda /usr/share/az* /usr/share/glade* /usr/local/lib/node_modules /usr/local/share/chromium /usr/local/share/powershell
- name: Creating 4testing offline self-extracting archive
if: ${{ github.event.inputs.offline == 'true' }}
run: |
INSTALL_PATH=${{ github.workspace }}/install
Expand All @@ -105,15 +105,13 @@ jobs:
chmod +x ${INSTALL_PATH}/${ARTIFACT_NAME}
- name: Configure AWS Credentials
if: ${{ github.event.inputs.offline == 'true' }}
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_OCI }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_OCI }}
aws-region: us-east-1

- name: Upload 4testing offline self-extracting archive
if: ${{ github.event.inputs.offline == 'true' }}
run: |
aws s3 cp ${{ github.workspace }}/install/${{ env.ARTIFACT_NAME }} \
${{ secrets.AWS_BUCKET_URL_OCI }}/${{ env.ARTIFACT_NAME }} \
Expand Down

0 comments on commit d305db8

Please sign in to comment.