Add support for multi-arch docker images #607
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Runs conda-lock against environment.yml for reproducible environments | ||
# Runs on any opened PR | ||
name: CondaLock | ||
on: | ||
repository_dispatch: | ||
types: [condalock-command] | ||
jobs: | ||
condalock: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
IMAGE: [base-notebook, pangeo-notebook, ml-notebook, pytorch-notebook] | ||
name: ${{ matrix.IMAGE }} | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 180 | ||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
with: | ||
token: ${{ secrets.PANGEOBOT_TOKEN }} | ||
# These lines are critical, otherwise Pangeo-bot pushes changes directly to master from PRs! | ||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.client_payload.pull_request.head.ref }} | ||
- name: Install Conda environment with Micromamba | ||
uses: mamba-org/setup-micromamba@v1 | ||
with: | ||
cache-environment: true | ||
environment-file: environment-condalock.yml | ||
# Could run as single step in parallel, but would complicate logs... | ||
- name: Run conda-lock ${{ matrix.IMAGE }} | ||
run: | | ||
cd base-notebook | ||
conda-lock lock -p linux-64 -p linux-aarch64 -p osx-64 -p osx-arm64 | ||
conda-lock render -k explicit -p linux-64 | ||
../generate-packages-list.py conda-linux-64.lock > packages.txt | ||
- name: Run conda-lock pangeo-notebook | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
run: | | ||
cd pangeo-notebook | ||
conda-lock lock -f environment.yml -f ../base-notebook/environment.yml -p linux-64 -p linux-aarch64 -p osx-64 -p osx-arm64 | ||
conda-lock render -k explicit -p linux-64 | ||
../generate-packages-list.py conda-linux-64.lock > packages.txt | ||
- name: Run conda-lock ml-notebook | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
run: | | ||
cd ml-notebook | ||
conda-lock lock -f environment.yml -f ../pangeo-notebook/environment.yml -f ../base-notebook/environment.yml -p linux-64 -p linux-aarch64 -p osx-64 -p osx-arm64 | ||
conda-lock render -k explicit -p linux-64 | ||
../generate-packages-list.py conda-linux-64.lock > packages.txt | ||
- name: Run conda-lock pytorch-notebook | ||
timeout-minutes: 5 | ||
continue-on-error: true | ||
run: | | ||
cd pytorch-notebook | ||
conda-lock lock -f environment.yml -f ../pangeo-notebook/environment.yml -f ../base-notebook/environment.yml -p linux-64 -p linux-aarch64 -p osx-64 -p osx-arm64 | ||
conda-lock render -k explicit -p linux-64 | ||
../generate-packages-list.py conda-linux-64.lock > packages.txt | ||
- name: Commit condalock files to PR | ||
run: | | ||
git config --global user.name 'pangeo-bot' | ||
git config --global user.email 'pangeo-bot@users.noreply.github.com' | ||
git add */conda*.lock */conda-lock.yml */packages.txt | ||
git commit -m "[condalock-command] autogenerated conda-lock files" | ||
git push | ||
- name: Add reaction | ||
uses: peter-evans/create-or-update-comment@v4 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
reaction-type: hooray | ||
# repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
# comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
# reaction-type: hooray |