Skip to content

add merlin without flux #39

add merlin without flux

add merlin without flux #39

Workflow file for this run

name: build merlin (and other manual Dockerfile)
on:
workflow_dispatch:
# Always test on pull request
# pull_request: []
# Deploy on merge to main
# push:
# branches:
# - main
jobs:
build:
runs-on: ubuntu-latest
name: Build Containers
strategy:
fail-fast: false
matrix:

Check failure on line 19 in .github/workflows/build-merlin.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build-merlin.yaml

Invalid workflow file

You have an error in your yaml syntax on line 19
container: [["merlin-demos/Dockerfile", 'ghcr.io/rse-ops/merlin-demos:merlin']
["merlin-demos/Dockerfile.flux", 'ghcr.io/rse-ops/merlin-demos-flux:merlin'],
["merlin-demos/Dockerfile.rabbitmq", 'ghcr.io/rse-ops/merlin-demos:rabbitmq'],
["merlin-demos/Dockerfile.redis", 'ghcr.io/rse-ops/merlin-demos:redis'],
["merlin-demos-certs/Dockerfile", 'ghcr.io/rse-ops/merlin-demos-certs:merlin'],
["merlin-demos-certs/Dockerfile.rabbitmq", 'ghcr.io/rse-ops/merlin-demos-certs:rabbitmq'],
["merlin-demos-certs/Dockerfile.redis", 'ghcr.io/rse-ops/merlin-demos-certs:redis']]
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Make Space For Build
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /opt/ghc
- name: Build and Tag Container
env:
path: ${{ matrix.container[0]}}
container: ${{ matrix.container[1]}}
run: |
dirname=$(dirname ${path})
dockerfile=$(basename ${path})
# root needs to be active user for Flux Operator
if [[ "${path}" == "merlin-demos-certs/Dockerfile" ]]; then
echo "USER root" >> ${path}
fi
cd $dirname
echo "Building ${container} in ${dirname}"
docker build -f ${dockerfile} -t ${container} .
- name: Login and Deploy Container
if: (github.event_name != 'pull_request')
env:
container: ${{ matrix.container[1] }}
run: |
set -x
docker images
echo ${{ secrets.GITHUB_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
docker push ${container}