Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 33 additions & 6 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,37 @@ jobs:
--health-timeout 5s
--health-retries 5

runs-on: ubuntu-latest
steps:
- name: pulling git repo
uses: actions/checkout@v2
runs-on: ubuntu-latest-8-cores
steps:
- name: Reclaim runner disk space
shell: bash
run: |
set -euxo pipefail
echo "Disk usage before cleanup"
df -h
# Trim cached diagnostic logs if we are on a self-hosted runner.
if [ -d "/home/runner/actions-runner/cached/_diag" ]; then
find /home/runner/actions-runner/cached/_diag -type f -name '*.log' -delete || true
fi
# Drop old workflow workspaces when available on self-hosted infrastructure.
if [ -d "/home/runner/actions-runner/_work" ]; then
find /home/runner/actions-runner/_work -maxdepth 1 -mindepth 1 -type d -mtime +7 -exec rm -rf {} + || true
fi
# Remove residual Buildx cache created by previous runs.
if [ -d "/tmp/.buildx-cache" ]; then
rm -rf /tmp/.buildx-cache || true
fi
# Free Docker space when the daemon is available (self-hosted runners).
if command -v docker >/dev/null 2>&1; then
docker system prune -af || true
docker volume prune -f || true
docker builder prune -af || true
fi
echo "Disk usage after cleanup"
df -h

- name: pulling git repo
uses: actions/checkout@v2

- name: Create RSA private key file
run: echo "${{ secrets.RSA_PRIVATE_KEY }}" > private_key.pem
Expand Down Expand Up @@ -106,8 +133,8 @@ jobs:
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}

deploy:
runs-on: ubuntu-latest
deploy:
runs-on: ubuntu-latest-8-cores
needs: [build]
environment:
name: production
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ public_key
private_key
env.
venv
test_app.db
Loading
Loading