Skip to content

Add apptainer support #112

Add apptainer support

Add apptainer support #112

name: Docker
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: self-hosted
environment: DockerHub
permissions:
contents: read
packages: write
# This is used to complete the identity challenge
# with sigstore/fulcio when running outside of PRs.
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'corretto'
- name: Compile TEPIC
run: pushd src/main/resources/org/exbio/tfprio/steps/TEPIC/Code && g++ TRAPmulti.cpp -O3 -fopenmp -o TRAPmulti && popd
- name: Install pipeJar
run: ./mvnw org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=lib/pipeJar.jar
- name: Build jar
run: ./mvnw clean compile assembly:single && mkdir -p bin && cp target/TFPRIO-1.0-bin.jar bin/TF-Prioritizer.jar
# Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
- name: Log in to Docker Hub
uses: docker/login-action@f054a8b539a109f9f41c372932f1ae047eff08c9
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
# Extract metadata (tags, labels) for Docker
# https://github.com/docker/metadata-action
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@98669ae865ea3cffbcbaa878cf57c20bbf1c6c38
with:
images: nicotru/tf-prioritizer
# Build and push Docker image with Buildx (don't push on PR)
# https://github.com/docker/build-push-action
- name: Build and push Docker image
id: build-and-push
uses: docker/build-push-action@ac9327eae2b366085ac7f6a2d02df8aa8ead720a
with:
context: .
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
# - name: Sync readme
# uses: ms-jpq/sync-dockerhub-readme@v1
# with:
# username: ${{ secrets.DOCKER_USERNAME }}
# password: ${{ secrets.DOCKER_PASSWORD }}
# repository: nicotru/tf-prioritizer
# readme: "README.md"