Skip to content

add: openmpi

add: openmpi #28

name: Docker
on:
push:
branches: [ master ]
tags: [ 'v*.*.*' ]
pull_request:
branches: [ master ]
env:
REGISTRY: ghcr.io
jobs:
build_ubuntu:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/GWmodel-Lab/GWmodel3-test-ubuntu
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build_cran_linux:
runs-on: ubuntu-latest
strategy:
matrix:
os: [Debian, Fedora]
version: [release, devel]
permissions:
contents: read
packages: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Log into registry ${{ env.REGISTRY }}
if: github.event_name != 'pull_request'
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/GWmodel-Lab/GWmodel3-test-${{ matrix.os }}-${{ matrix.version }}
tags: |
type=semver,pattern={{version}}
type=ref,event=branch
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@v3
with:
context: .
file: Dockerfile.${{ matrix.os }}.${{ matrix.version }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}