Update pangeo-notebook metapackage version to 2024.02.21 (#515) #145
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
# Re-tag staging SHA-tagged image with git tag and 'latest' | |
# tags can be anything, but typically calver string (2020.06.10) | |
name: Publish | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
DOCKER_ORG: pangeo | |
GITHUB_SHA: ${{ github.sha }} | |
GITHUB_REF: ${{ github.ref }} | |
jobs: | |
matrix-build: | |
strategy: | |
fail-fast: false | |
matrix: | |
IMAGE: [base-image, base-notebook, pangeo-notebook, ml-notebook, pytorch-notebook] | |
name: ${{ matrix.IMAGE }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# https://github.com/actions/runner-images/issues/2840#issuecomment-790492173 | |
- name: Free up disk space | |
run: | | |
df -h | |
docker image ls | |
sudo apt clean | |
sudo rm -rf /usr/local/lib/android /usr/share/dotnet /opt/ghc | |
df -h | |
- name: Set Job Environment Variables | |
run: | | |
SHA7="${GITHUB_SHA::7}" | |
TAG="${GITHUB_REF##*/}" | |
echo "SHA7=${SHA7}" >> $GITHUB_ENV | |
echo "TAG=${TAG}" >> $GITHUB_ENV | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to Quay.io | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USER }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Pull Image for Corresponding GitHub Commit | |
run: | | |
docker pull ${DOCKER_ORG}/${{ matrix.IMAGE }}:${SHA7} | |
- name: Retag Images | |
run: | | |
docker tag ${DOCKER_ORG}/${{ matrix.IMAGE }}:${SHA7} ${DOCKER_ORG}/${{ matrix.IMAGE }}:latest | |
docker tag ${DOCKER_ORG}/${{ matrix.IMAGE }}:${SHA7} ${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG} | |
docker tag ${DOCKER_ORG}/${{ matrix.IMAGE }}:${SHA7} quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:latest | |
docker tag ${DOCKER_ORG}/${{ matrix.IMAGE }}:${SHA7} quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG} | |
- name: Push Tags to Docker Hub | |
run: | | |
docker push ${DOCKER_ORG}/${{ matrix.IMAGE }}:latest | |
docker push ${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG} | |
- name: Push Tags To Quay.io | |
run: | | |
docker push quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:latest | |
docker push quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG} |