Skip to content

Merge pull request #203 from bennibbelink/remove-numpy-pin #40

Merge pull request #203 from bennibbelink/remove-numpy-pin

Merge pull request #203 from bennibbelink/remove-numpy-pin #40

name: Publish Latest Cymetric
on:
# allows us to run workflows manually
workflow_dispatch:
pull_request:
paths:
- '.github/workflows/publish_latest.yml'
push:
branches:
- main
jobs:
build-cymetric-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
ubuntu_versions : [
20.04,
22.04,
]
pkg_mgr : [
apt,
conda,
]
name: Build, Test, Publish
steps:
- name: Tag as ci-image-cache by default
run: |
echo "tag=ci-image-cache" >> "$GITHUB_ENV"
- name: Tag as latest
if: ${{ github.repository_owner == 'cyclus' && github.ref == 'refs/heads/main' }}
run: |
echo "tag=latest" >> "$GITHUB_ENV"
- name: Checkout repository
uses: actions/checkout@v4
- name: Log in to the Container registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and Test Cymetric
uses: docker/build-push-action@v5
with:
cache-from: type=registry,ref=ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache
cache-to: type=registry,ref=ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:ci-layer-cache,mode=max
file: docker/Dockerfile
push: true
tags: ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:${{ env.tag }}
build-args: |
pkg_mgr=${{ matrix.pkg_mgr }}
ubuntu_version=${{ matrix.ubuntu_versions }}
cycamore_tag=latest