matrix:
  VERSION:
    - 1.5
    - 1.4

build:
  image: armhfbuild/alpine:3.2
  commands:
    - sed -i 's/FROM /FROM armhfbuild\//' $$VERSION/Dockerfile

publish:
  docker:
    file: $$VERSION/Dockerfile
    username: $$DOCKER_USER
    email: $$DOCKER_EMAIL
    password: $$DOCKER_PASSWORD
    repo: armhfbuild/golang
    tag: "$$VERSION"
    storage_driver: overlay

    # Caching
    load: docker/image.tar
    save:
      destination: docker/image.tar
      tag: "$$BRANCH"
cache:
  mount:
    - docker/image.tar

matrix:
  VERSION:
    - 1.5
    - 1.4

build:
  image: armhfbuild/alpine:3.2
  commands:
    - sed -i 's/FROM /FROM armhfbuild\//' $$VERSION/Dockerfile

publish:
  docker:
    file: $$VERSION/Dockerfile
    username: $$DOCKER_USER
    email: $$DOCKER_EMAIL
    password: $$DOCKER_PASSWORD
    repo: armhfbuild/golang
    tag: "$$VERSION"
    storage_driver: overlay

    # Caching
    load: docker/image.tar
    save:
      destination: docker/image.tar
      tag: "$$VERSION"
cache:
  mount:
    - docker/image.tar

Fix cache to use VERSION-named tag as well
Fix cache to use VERSION-named tag as well
