Testing only base image #257
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
on: | |
push: {} | |
workflow_dispatch: {} | |
jobs: | |
generate-matrix: | |
name: Generate build matrix | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- id: set-matrix | |
run: echo "::set-output name=matrix::$(./.github/workflows/generate-image-build-matrix images/*)" | |
build-base-image: | |
name: Build Arena Base Image | |
needs: [generate-matrix] | |
runs-on: ubuntu-latest | |
if: ${{ needs.generate-matrix.outputs.matrix != '[]' }} | |
strategy: | |
fail-fast: true | |
matrix: | |
python_version: ${{ fromJson(needs.generate-matrix.outputs.matrix).base }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Login to GHCR | |
uses: docker/login-action@v2 | |
with: | |
registry: ghcr.io | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Login to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
registry: docker.io | |
username: diambrabot | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Login to Quay | |
uses: docker/login-action@v2 | |
with: | |
registry: quay.io | |
username: diambra+github | |
password: ${{ secrets.QUAY_TOKEN }} | |
- name: Build and push base image | |
uses: docker/build-push-action@v3 | |
with: | |
context: . | |
file: images/base/Dockerfile | |
push: true | |
tags: ghcr.io/diambra/arena-base:${{ github.sha }},docker.io/diambra/arena-base:${{ github.sha }},quay.io/diambra/arena-base:${{ github.sha }} | |
build-args: PYTHON_VERSION=${{ matrix.python_version }} | |
- name: Save base image | |
uses: actions/upload-artifact@v2 | |
with: | |
name: base-image | |
path: ${{ runner.workspace }}/images/base | |
#build-and-push-arena-libs-images: | |
# name: Build Arena Libs Image | |
# needs: [generate-matrix] | |
# runs-on: ubuntu-latest | |
# if: ${{ needs.generate-matrix.outputs.matrix != '[]' }} | |
# strategy: | |
# fail-fast: true | |
# matrix: | |
# include: ${{ fromJson(needs.generate-matrix.outputs.matrix) }} | |
# | |
# steps: | |
# - name: Checkout | |
# uses: actions/checkout@v2 | |
# | |
# - name: Login to GHCR | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: ghcr.io | |
# username: ${{ github.actor }} | |
# password: ${{ secrets.GITHUB_TOKEN }} | |
# | |
# - name: Login to Docker Hub | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: docker.io | |
# username: diambrabot | |
# password: ${{ secrets.DOCKERHUB_TOKEN }} | |
# | |
# - name: Login to Quay | |
# uses: docker/login-action@v2 | |
# with: | |
# registry: quay.io | |
# username: diambra+github | |
# password: ${{ secrets.QUAY_TOKEN }} | |
# | |
# - name: Docker meta | |
# id: meta | |
# uses: docker/metadata-action@v4 | |
# with: | |
# images: | | |
# ghcr.io/diambra/arena-${{ matrix.name }} | |
# docker.io/diambra/arena-${{ matrix.name }} | |
# quay.io/diambra/arena-${{ matrix.name }} | |
# tags: | | |
# type=ref,event=branch | |
# type=semver,pattern=v{{version}} | |
# type=semver,pattern=v{{major}}.{{minor}} | |
# type=raw,value=latest,enable={{is_default_branch}} | |
# | |
# - name: Build and push arena ${{ matrix.dir }} | |
# uses: docker/build-push-action@v3 | |
# with: | |
# context: . | |
# file: ${{ matrix.dir }}/Dockerfile | |
# push: true | |
# tags: ${{ steps.meta.outputs.tags }} | |
# labels: ${{ steps.meta.outputs.labels }} | |
# build-args: ${{ matrix.build_args }} |