Skip to content

Commit

Permalink
Standardize capitalization, report more about container
Browse files Browse the repository at this point in the history
  • Loading branch information
rhiannonlynne committed Nov 24, 2023
1 parent 623e144 commit 8e552fc
Show file tree
Hide file tree
Showing 4 changed files with 50 additions and 13 deletions.
13 changes: 9 additions & 4 deletions .github/workflows/build_container.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Build docker image
# Follows https://github.com/lsst-sqre/build-and-push-to-ghcr

jobs:
build:
build_container:
runs-on: ubuntu-latest
# See https://lsstc.slack.com/archives/C2JP8GGVC/p1698782669757349?thread_ts=1698779230.846079&cid=C2JP8GGVC
permissions:
Expand All @@ -25,7 +25,7 @@ jobs:
channel-priority: strict
show-channel-urls: true

- name: configure conda and install requirements
- name: Configure conda and install requirements
id: rs-install
shell: bash -l {0}
run: |
Expand All @@ -52,7 +52,7 @@ jobs:
export RUBIN_SIM_DATA_DIR=~/rubin_sim_data
scheduler_download_data --update --tdqm_disable
- name: report environment
- name: Report environment
shell: bash -l {0}
run: |
echo pwd is `pwd`
Expand All @@ -69,7 +69,12 @@ jobs:
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache

- run: echo Pushed ghcr.io/${{ github.repository }}:${{ steps.build.outputs.tag }}
- name: Report build outputs
shell: bash -l {0}
run: |
echo Pushed ghcr.io/${{ github.repository }}:${{ steps.build.outputs.tag }}
echo Fully qualified image digest: ${{ steps.build.outputs.fully_qualified_image_digest }}
echo Tag of the image: ${{ steps.build.outputs.tag }}
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build_docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,32 @@ jobs:
channel-priority: strict
show-channel-urls: true

- name: configure and install requirements and documenteer
- name: Configure and install requirements and documenteer
shell: bash -l {0}
run: |
conda config --set always_yes yes
conda install --quiet --file=requirements.txt
conda install --quiet pip
pip install "documenteer[guide]"
- name: install schedview
- name: Install schedview
shell: bash -l {0}
run: |
echo `pwd`
python -m pip install .
- name: check conda and documenteer
- name: Check conda and documenteer
shell: bash -l {0}
run: |
conda list
- name: build docs
- name: Build docs
shell: bash -l {0}
run: |
cd docs
package-docs build
- name: upload documentation
- name: Upload documentation
uses: lsst-sqre/ltd-upload@v1
with:
project: "schedview"
Expand Down
32 changes: 32 additions & 0 deletions .github/workflows/cleanup_cache.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Auto cleanup cache for branch
on:
pull_request:
types:
- closed

jobs:
cleanup-cache:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
echo "Fetching list of cache key"
cacheKeysForPR=$(gh actions-cache list -R $REPO -B $BRANCH | cut -f 1)
## Setting this to not fail the workflow while deleting cache keys.
set +e
echo "Deleting caches..."
for cacheKey in $cacheKeysForPR
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
echo "Done"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge



8 changes: 4 additions & 4 deletions .github/workflows/test_and_build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
channel-priority: strict
show-channel-urls: true

- name: configure conda and install requirements
- name: Configure conda and install requirements
id: rs-install
shell: bash -l {0}
run: |
Expand All @@ -63,17 +63,17 @@ jobs:
export RUBIN_SIM_DATA_DIR=~/rubin_sim_data
scheduler_download_data --update --tdqm_disable
- name: install schedview
- name: Install schedview
shell: bash -l {0}
run: |
echo `pwd`
python -m pip install . --no-deps
- name: conda list
- name: Conda list
shell: bash -l {0}
run: conda list

- name: run unit tests
- name: Run unit tests
shell: bash -l {0}
run: |
export RUBIN_SIM_DATA_DIR=~/rubin_sim_data
Expand Down

0 comments on commit 8e552fc

Please sign in to comment.