Skip to content

Commit

Permalink
configure git checkout and pip
Browse files Browse the repository at this point in the history
  • Loading branch information
shaneknapp committed Jun 24, 2024
1 parent e9ba253 commit 1924466
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 1 deletion.
44 changes: 44 additions & 0 deletions .github/workflows/hubploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: Deploy hub
on:
workflow_run:
workflows: ['Build and push container image']
types: [completed]
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
steps:

# For biggish images, github actions runs out of disk space.
# So we cleanup some unwanted things in the disk image, and reclaim that space for our docker use
# https://github.com/actions/virtual-environments/issues/2606#issuecomment-772683150
# and https://github.com/easimon/maximize-build-space/blob/b4d02c14493a9653fe7af06cc89ca5298071c66e/action.yml#L104
# This gives us a total of about 52G of free space, which should be enough for now
- name: cleanup disk space
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h
- name: Checkout files in repo
uses: actions/checkout@main
with:
sparse-checkout: |
deployments/logodev
- name: install python + requirements
uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: 'pip' # caching pip dependencies
- run: pip install -r requirements.txt

- name: see if the correct dir has been checked out, and the requirements have been installed
run: |
ls -la deployments/logodev
pip freeze
# Lets us monitor disks getting full as images get bigger over time
- name: Show how much disk space is left
run: df -h
2 changes: 1 addition & 1 deletion .github/workflows/test.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build and push container image
name: Build and test container image

on:
pull_request:
Expand Down

0 comments on commit 1924466

Please sign in to comment.