Bump actions/download-artifact from 1 to 4.1.7 in /.github/workflows #1
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
# Only test building images | |
name: PullRequest | |
on: | |
pull_request: | |
branches: | |
- master | |
env: | |
DOCKER_ORG: pangeo | |
GITHUB_SHA: ${{ github.sha }} | |
GITHUB_REF: ${{ github.ref }} | |
jobs: | |
base-image: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Build Base Image | |
run: | | |
cd base-image | |
docker build -t ${DOCKER_ORG}/base-image:PR . | |
- name: Save Docker Image | |
run: | | |
docker save ${DOCKER_ORG}/base-image:PR | gzip > base-image.tar.gz | |
- name: Upload Base Image | |
uses: actions/upload-artifact@v1 | |
with: | |
name: base-image | |
path: base-image.tar.gz | |
matrix-build: | |
needs: base-image | |
strategy: | |
fail-fast: false | |
matrix: | |
IMAGE: [base-notebook, pangeo-notebook, ml-notebook] | |
name: ${{ matrix.IMAGE }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Download Base Docker Image | |
uses: actions/[email protected] | |
with: | |
name: base-image | |
path: ./artifact | |
- name: Load Docker Image | |
run: | | |
docker load < ./artifact/base-image.tar.gz | |
docker images | |
# Create temporary Dockerfile | |
echo "FROM ${DOCKER_ORG}/base-image:PR" > Dockerfile | |
- name: Build Image | |
run: | | |
cd ${{ matrix.IMAGE }} | |
docker build -t ${DOCKER_ORG}/${{ matrix.IMAGE }}:PR -f ../Dockerfile . | |
- name: Export Full Conda Environment | |
run: | | |
docker run ${DOCKER_ORG}/${{ matrix.IMAGE }}:PR conda list --export | |
- name: Test Image | |
run: | | |
docker run -u 1000 -w /srv/test -v $PWD:/srv/test ${DOCKER_ORG}/${{ matrix.IMAGE }}:PR ./run_tests.sh ${{ matrix.IMAGE }} |