59 lines
2.0 KiB
YAML
59 lines
2.0 KiB
YAML
#@ load("@ytt:data", "data")
|
|
|
|
#@ def to_build_args(d):
|
|
#@ return ",".join(['{0}={1}'.format(k,d[k]) for k in d.keys()])
|
|
#@ end
|
|
|
|
---
|
|
name: Workflow Base Images
|
|
#! https://github.com/k14s/ytt/issues/189
|
|
a_magic_string_that_we_will_sed_to_on: [workflow_dispatch]
|
|
jobs:
|
|
ci-base:
|
|
name: ci-base
|
|
runs-on: ubuntu-18.04
|
|
strategy:
|
|
matrix:
|
|
erlang_version: #@ data.values.erlang_versions
|
|
fail-fast: false
|
|
steps:
|
|
- name: CHECKOUT REPOSITORY
|
|
uses: actions/checkout@v2
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v1
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v1
|
|
- name: Cache Docker layers
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: /tmp/.buildx-cache
|
|
key: ${{ runner.os }}-buildx-${{ github.sha }}
|
|
restore-keys: |
|
|
${{ runner.os }}-buildx-
|
|
- name: Login to GCR
|
|
uses: docker/login-action@v1
|
|
with:
|
|
registry: eu.gcr.io
|
|
username: _json_key
|
|
password: ${{ secrets.GCR_JSON_KEY }}
|
|
- name: CREATE ERLANG+ELIXIR IMAGE (${{ matrix.erlang_version }})
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
file: ci/dockerfiles/${{ matrix.erlang_version }}/erlang_elixir
|
|
tags: eu.gcr.io/cf-rabbitmq-core/erlang_elixir:${{ matrix.erlang_version }}
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
cache-to: type=local,dest=/tmp/.buildx-cache
|
|
- name: CREATE BASE CI IMAGE (${{ matrix.erlang_version }})
|
|
uses: docker/build-push-action@v2
|
|
with:
|
|
push: true
|
|
file: ci/dockerfiles/ci-base
|
|
#@yaml/text-templated-strings
|
|
build-args: |
|
|
ERLANG_VERSION=${{ matrix.erlang_version }}
|
|
SECONDARY_UMBRELLA_GITREFS=(@= ' '.join(data.values.secondary_umbrella_gitrefs) @)
|
|
tags: eu.gcr.io/cf-rabbitmq-core/ci-base:${{ matrix.erlang_version }}
|
|
cache-from: type=local,src=/tmp/.buildx-cache
|
|
cache-to: type=local,dest=/tmp/.buildx-cache
|