Skip to content

Update Docker.yml

Update Docker.yml #8

Workflow file for this run

name: Docker
on:
push:
paths:
- 'docker/environment.yaml'
- '.github/workflows/Docker.yml'
jobs:
build-docker:
strategy:
fail-fast: false
matrix:
cfg:
- runs-on: ubuntu-latest
platform: linux-64
python-version: '3.10'
tags: 'psi4/psi4:latest,psi4/psi4:1.8.2,psi4/psi4:1.8'
defaults:
run:
shell: bash -l {0}
runs-on: ${{ matrix.cfg.runs-on }}
name: "Docker • 🐍 ${{ matrix.cfg.python-version }} • ${{ matrix.cfg.platform }}"
steps:
- uses: actions/checkout@v3
- name: Specialize Python
working-directory: docker
run: |
cat environment.yaml
sed -i.bak 's/- python=3.8/- python=${{ matrix.cfg.python-version }}/g' environment.yaml
cat environment.yaml
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: psi4
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./docker
build-args: |
CondaFile=environment.yaml
push: true
tags: ${{ matrix.cfg.tags }}
#tags: psi4/psi4:latest,psi4/psi4:1.8.0,psi4/psi4:1.8
- name: Test
run: |
docker run psi4/psi4:latest psi4 --version
docker run psi4/psi4:latest pytest -v /opt/conda/lib/python${{ matrix.cfg.python-version }}/site-packages/psi4/tests/ --color yes -n auto -m smoke
- name: Set up Apptainer
if: false
uses: eWaterCycle/setup-apptainer@v2
with:
apptainer-version: 1.1.2
- name: Run an apptainer container
if: false
#run: apptainer run docker://alpine cat /etc/os-release
run: apptainer build psi4-1.8.sif docker-daemon:psi4/psi4:latest
- name: Test Apptainer
if: false
run: |
apptainer run psi4-1.8.sif psi4 --version
apptainer run psi4-1.8.sif pytest -v /opt/conda/lib/python3.10/site-packages/psi4/tests/ --color yes -n auto -m smoke
- name: Archive Apptainer Image
if: false
uses: actions/upload-artifact@v2
with:
name: apptainer_sif
path: |
psi4-1.8.sif
retention-days: 1
- name: Push to Sylabs
if: false
run: apptainer push psi4-1.8.sif library://psi4/psi4/psi4-1.8:latest