fix indentation on matrix job #164
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] | |
platform: [linux/amd64] | |
# Extra CPU architectures for specific images | |
include: | |
- IMAGE: "base-image" | |
platform: "linux/arm64" | |
- IMAGE: "base-notebook" | |
platform: "linux/arm64" | |
- IMAGE: "pangeo-notebook" | |
platform: "linux/arm64" | |
name: ${{ matrix.IMAGE }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
# 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@v3 | |
- name: Login to Docker Hub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USER }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to Quay.io | |
uses: docker/login-action@v3 | |
with: | |
registry: quay.io | |
username: ${{ secrets.QUAY_USER }} | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Pull Image for Corresponding GitHub Commit | |
run: | | |
docker pull --platform ${{ matrix.platform }} ${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 --platform ${{ matrix.platform }} ${DOCKER_ORG}/${{ matrix.IMAGE }}:latest | |
docker push --platform ${{ matrix.platform }} ${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG} | |
- name: Push Tags To Quay.io | |
run: | | |
docker push --platform ${{ matrix.platform }} quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:latest | |
docker push --platform ${{ matrix.platform }} quay.io/${DOCKER_ORG}/${{ matrix.IMAGE }}:${TAG} |