Skip to content

Simplify sheet approximation #245

Simplify sheet approximation

Simplify sheet approximation #245

Workflow file for this run

name: CD
on:
push:
branches:
- main
tags:
- v*
pull_request:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
KL_FILE: klayout_0.29.0-1_amd64.deb
KL_HASH: 421df42661a3d795b534da5048261044
jobs:
build-and-push-docker:
name: Docker
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10.x'
- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ci/Dockerfile
build-args: |
KL_FILE=${{ env.KL_FILE }}
KL_HASH=${{ env.KL_HASH }}
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-and-push-singularity:
name: Singularity
runs-on: ubuntu-latest
container:
image: quay.io/singularity/singularity:v3.10.2
options: --privileged
permissions:
contents: read
packages: write
if: github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- name: Extract metadata (tags, labels)
id: meta
uses: docker/metadata-action@v3
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
- name: Install dependencies
run: apk update && apk add debootstrap perl
- name: Build Container
run: |
cd singularity && ./singularity.sh
echo "Tag is ${{ steps.meta.outputs.tags }}."
- name: Login and Deploy Container
working-directory: ./singularity/libexec
shell: bash
run: |
echo ${{ secrets.GITHUB_TOKEN }} | singularity remote login -i -u ${{ github.repository_owner }} \
--password-stdin oras://ghcr.io
# loop over tags separated with newlines
while IFS= read -r remote; do
singularity push -U kqclib "oras://${remote}-singularity"
done <<< "${{ steps.meta.outputs.tags }}"