-
Notifications
You must be signed in to change notification settings - Fork 1
84 lines (73 loc) · 2.46 KB
/
make-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
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@v3
# 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@v3
- name: Log into the container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for docker
id: meta
uses: docker/metadata-action@v4
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@v3
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 }}"