Skip to content

Commit

Permalink
Merge pull request #41 from shaneknapp/more-fixes
Browse files Browse the repository at this point in the history
more cleanup and fixes
  • Loading branch information
shaneknapp authored Jul 26, 2024
2 parents a2ce068 + f0ba759 commit a02e39f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 14 deletions.
24 changes: 11 additions & 13 deletions .github/workflows/build-and-push.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ jobs:
runs-on: ubuntu-latest
env:
DOCKER_CONFIG: $HOME/.docker
HUB: ${{ vars.HUB }}
IMAGE: ${{ vars.IMAGE }}
outputs:
image-tag: ${{ steps.build-and-push.outputs.IMAGE_SHA_TAG }}
Expand Down Expand Up @@ -54,7 +53,8 @@ jobs:
with:
# Make sure username & password/token pair matches your registry credentials
DOCKER_REGISTRY: us-central1-docker.pkg.dev
IMAGE_NAME: ucb-datahub-2018/user-images/logodev-user-image
IMAGE_NAME: ${{ env.IMAGE }}
#IMAGE_NAME: ucb-datahub-2018/user-images/logodev-user-image
# Disable pushing a 'latest' tag, as this often just causes confusion
LATEST_TAG_OFF: true
# Put repo contents in /srv/repo, rather than the default (/home/jovyan). The home directory
Expand All @@ -63,44 +63,42 @@ jobs:
# working, as it is needed in runtime.
REPO_DIR: /srv/repo

- name: print the image tag
run: |
echo ${{ steps.build-and-push.outputs.IMAGE_SHA_TAG }}
- name: store the image tag as an env var
run: |
IMAGE_TAG=${{ steps.build-and-push.outputs.IMAGE_SHA_TAG }}
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
# Lets us monitor disks getting full as images get bigger over time
- name: Show how much disk space is left
run: df -h

create-pr:
runs-on: ubuntu-latest
needs: build-and-push
env:
HUB: ${{ vars.HUB }}
IMAGE: ${{ vars.IMAGE }}
steps:
- name: print the hash
run: |
echo $IMAGE_TAG
echo ${{ needs.build-and-push.outputs.image-tag }}
echo "IMAGE_TAG=${{ needs.build-and-push.outputs.image-tag }}" >> $GITHUB_ENV
- name: logic test
- name: logic test to see if we should create a PR
id: set-create-pr
run: |
if [ -z "$IMAGE_TAG" ]; then
echo "CREATE_PR=false" >> $GITHUB_ENV
echo "::set-output name=create_pr::false"
else
echo "CREATE_PR=true" >> $GITHUB_ENV
echo "::set-output name=create_pr::true"
fi
- name: Checkout files in repo
if: ${{ steps.set-create-pr.outputs.create_pr }} == 'true'
uses: actions/checkout@v4
with:
repository: 'berkeley-dsep-infra/datahub'
sparse-checkout: |
hub/
deployments/${HUB}
deployments/${{ env.HUB }}
- name: see if the correct dir has been checked out, and the requirements have been installed
run: |
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ dependencies:
- matplotlib==3.7.1
- mdit-py-plugins==0.4.0
- numpy==1.24.2
- pandas==2.2.2
- pandas==2.0.2
- plotly==5.13.1
- requests==2.28.2
- scikit-image==0.19.3
Expand Down

0 comments on commit a02e39f

Please sign in to comment.