Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixing typo, minor workflow tweaks #8

Merged
Merged
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
12 changes: 6 additions & 6 deletions .github/workflows/build-push-image-commit.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,6 @@ jobs:
image-tag: ${{ steps.build-and-push.outputs.IMAGE_SHA_TAG }}

steps:
- name: Cleanup disk space
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h

- name: Check out the image repo
uses: actions/checkout@v4
with:
Expand All @@ -35,6 +30,12 @@ jobs:
.github/**
images/**

- name: Cleanup disk space
if: steps.changed-files.outputs.any_changed == 'true'
run: |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h

- name: Log in to GAR
if: steps.changed-files.outputs.any_changed == 'true'
uses: docker/login-action@v3
Expand Down Expand Up @@ -81,7 +82,6 @@ jobs:
repository: 'berkeley-dsep-infra/datahub'
sparse-checkout: |
deployments/
hub/

- name: Set git identity
if: ${{ env.IMAGE_TAG }}
Expand Down
13 changes: 3 additions & 10 deletions .github/workflows/build-test-image.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,6 @@ jobs:
env:
DOCKER_CONFIG: $HOME/.docker
steps:
- 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@v4

Expand All @@ -28,13 +23,11 @@ jobs:
.github/**
images/**

- name: What files changed?
- name: Cleanup disk space
if: steps.changed-files.outputs.any_changed == 'true'
env:
CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
echo "One or more image file(s) has changed:"
echo "$CHANGED_FILES"
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc
df -h

- name: Build and test the image if any image file(s) changed
if: steps.changed-files.outputs.any_changed == 'true'
Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ what's been modified and check out the diffs: `git status` and `git diff`.

### Building the image locally

You should use [repo2-docker](https://repo2docker.readthedocs.io/en/latest/) to build and use/test the image on your own device before you push and create a PR. It's better (and typically faster) to do this first before using CI/CD. There's no need to waste Github Action minutes to test build images when you can do this on your own device!
You should use [repo2docker](https://repo2docker.readthedocs.io/en/latest/) to build and use/test the image on your own device before you push and create a PR. It's better (and typically faster) to do this first before using CI/CD. There's no need to waste Github Action minutes to test build images when you can do this on your own device!

Run `repo2docker` from inside the cloned image repo. To run on a linux/WSL2 linux shell:
```
Expand Down