Skip to content

ci: fix build context #25

ci: fix build context

ci: fix build context #25

name: Build and publish
on:
schedule:
- cron: "0 0 1 * *"
push:
branches: [master]
env:
UBUNTU_VERSION: 22.04
OCCT_VERSION: 7.7.2
CGAL_VERSION: 5.6
EIGEN_VERSION: 3.4.0
ASI_VERSION: 2024.1
RAPIDJSON_VERSION: 1.1.0
NVM_VERSION: 0.39.7
jobs:
build-ubuntu-occt-asi-cgal-eigen-node:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
IMAGE_NAME: ubuntu-occt-asi-cgal-eigen-node
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: ./tools/${{ env.IMAGE_NAME }}}
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 }}
rapidjson_version=${{ env.RAPIDJSON_VERSION }}
asi_version=${{ env.ASI_VERSION }}
tags: |
ghcr.io/michsior14/${{ env.IMAGE_NAME }}:node-${{matrix.node}}
ghcr.io/michsior14/${{ env.IMAGE_NAME }}:${{ env.UBUNTU_VERSION }}-occt-${{ env.OCCT_VERSION }}-asi-${{ env.ASI_VERSION }}-cgal-${{ env.CGAL_VERSION }}-eigen-${{ env.EIGEN_VERSION }}-node-${{ matrix.node }}
build-ubuntu-occt-cgal-eigen-node:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
env:
IMAGE_NAME: ubuntu-occt-cgal-eigen-node
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: ./tools/${{ env.IMAGE_NAME }}}
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 }}