-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.43 KB
/
build-and-publish.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
name: Build and publish
on:
schedule:
- cron: "0 0 1 * *"
push:
branches: [master]
env:
IMAGE_NAME: ubuntu-occt-cgal-eigen-node
UBUNTU_VERSION: 22.04
OCCT_VERSION: 7.7.2
CGAL_VERSION: 5.6
EIGEN_VERSION: 3.4.0
NVM_VERSION: 0.39.5
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
strategy:
matrix:
node: [18, 20]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
build-args: |
node_version=${{ matrix.node }}
ubuntu_version=${{ env.UBUNTU_VERSION }}
occt_version=${{ env.OCCT_VERSION }}
cgal_version=${{ env.CGAL_VERSION }}
eigen_version=${{ env.EIGEN_VERSION }}
nvm_version=${{ env.NVM_VERSION }}
tags: |
ghcr.io/michsior14/${{ env.IMAGE_NAME }}:node-${{matrix.node}}
ghcr.io/michsior14/${{ env.IMAGE_NAME }}:${{ env.UBUNTU_VERSION }}-occt-${{ env.OCCT_VERSION }}-cgal-${{ env.CGAL_VERSION }}-eigen-${{ env.EIGEN_VERSION }}-node-${{ matrix.node }}