Skip to content

More CI Updates

More CI Updates #7

Workflow file for this run

name: Publish Stable Cymetric
on:
pull_request:
paths:
- '.github/workflows/publish_release.yml'
release:
types: [released]
jobs:
build-and-test-for-release:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
ubuntu_versions : [
20.04,
22.04,
]
pkg_mgr : [
apt,
conda
]
name: Building, Test, Publish
steps:
- name: Tag as ci-image-cache
run: |
echo "version_tag=ci-image-cache" >> "$GITHUB_ENV"
echo "stable_tag=ci-image-cache" >> "$GITHUB_ENV"
- name: Tag as stable
if: ${{ github.repository_owner == 'cyclus' && github.event_name == 'release' }}
run: |
echo "version_tag=${{ github.event.release.tag_name }}" >> "$GITHUB_ENV"
echo "stable_tag=stable" >> "$GITHUB_ENV"
- 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: Checkout Cymetric
uses: actions/checkout@v4
- 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
file: docker/Dockerfile
push: true
tags: |
ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:${{ env.version_tag }}
ghcr.io/cyclus/cymetric_${{ matrix.ubuntu_versions }}_${{ matrix.pkg_mgr }}/cymetric:${{ env.stable_tag }}
build-args: |
pkg_mgr=${{ matrix.pkg_mgr }}
ubuntu_version=${{ matrix.ubuntu_versions }}
cycamore_tag=stable