Skip to content

Merge pull request #1588 from cyclus/2023-maintenance-update #1

Merge pull request #1588 from cyclus/2023-maintenance-update

Merge pull request #1588 from cyclus/2023-maintenance-update #1

name: Build, Test & Publish docker images for future CI and other users
on:
# allows us to run workflows manually
workflow_dispatch:
pull_request:
push:
branches:
- main
jobs:
build-dependency-and-test-img:
runs-on: ubuntu-latest
strategy:
matrix:
ubuntu_versions : [
22.04,
]
pkg_mgr : [
apt,
conda,
]
name: Installing Dependencies, Building cyclus and running tests
steps:
- name: default environment
run: |
echo "tag-latest-on-default=false" >> "$GITHUB_ENV"
- name: condition on trigger parameters
if: ${{ github.repository_owner == 'cyclus' && github.ref == 'refs/heads/main' }}
run: |
echo "tag-latest-on-default=true" >> "$GITHUB_ENV"
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout repository
uses: actions/checkout@v3
- name: Installing Dependencies in Docker image
uses: firehed/multistage-docker-build-action@v1
with:
repository: ghcr.io/${{ github.repository_owner }}/cyclus_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}
stages: ${{ matrix.pkg_mgr }}-deps, cyclus
server-stage: cyclus-test
quiet: false
parallel: true
tag-latest-on-default: ${{ env.tag-latest-on-default }}
dockerfile: docker/Dockerfile
build-args: pkg_mgr=${{ matrix.pkg_mgr }}