Magix3d recipe updated #59
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
name: Make release | |
on: | |
push: | |
tags: | |
- '*' | |
env: | |
REGISTRY: 'ghcr.io' | |
USER_NAME: 'LIHPC-Computational-Geometry' | |
jobs: | |
make-release: | |
name: Make release | |
runs-on: ubuntu-latest | |
steps: | |
# Checkout source files to get list-versions.py | |
- name: Checkout sources | |
uses: actions/checkout@v4 | |
# Create a markdown file with Spack products and versions | |
- name: List products and versions | |
shell: bash | |
run: | | |
echo Project path: $GITHUB_WORKSPACE | |
cd $GITHUB_WORKSPACE/.github/workflows && python list-versions.py $GITHUB_WORKSPACE | |
# Create a Github Release | |
- name: Create github release | |
uses: softprops/action-gh-release@v1 | |
with: | |
body_path: ${{ github.workspace }}/recipes.md | |
files: ${{ github.workspace }}/recipes.sh | |
env: | |
USERNAME: ${{ github.actor }} | |
PASSWORD: ${{ github.token }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
make-containers: | |
name: Make cmake and spack containers | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
image: [cmake-cgcore-magix3d, spack-cgcore-magix3d] | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log into the container registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata (tags, labels) for docker | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.USER_NAME }}/${{ matrix.image }} | |
labels: | | |
org.opencontainers.image.title=lihpccg | |
org.opencontainers.image.vendor=CEA | |
tags: | | |
type=raw, latest | |
type=raw, {{date 'YYYYMMDD'}} | |
type=pep440, pattern={{version}} | |
- name: Build and push image | |
uses: docker/build-push-action@v5 | |
with: | |
file: ./dockerfiles/Dockerfile.${{ matrix.image }} | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
build-args: | | |
"CGCORE_VERSION=latest" | |
"SPACK_RECIPES_RELEASE_NUMBER=${{ github.ref_name }}" |