Skip to content
Snippets Groups Projects
Commit ee71ca50 authored by Benjamin Wingfield's avatar Benjamin Wingfield
Browse files

stop building images

parent c87ad51a
No related branches found
No related tags found
No related merge requests found
name: build development images
on:
push:
branches:
- dev
env:
REGISTRY_USERNAME: ${{ secrets.DOCKER_USERNAME }}
REGISTRY_TOKEN: ${{ secrets.DOCKER_TOKEN }}
DOCKER_REGISTRY_LOGIN: "dockerhub.ebi.ac.uk"
SINGULARITY_REGISTRY_LOGIN: "oras://dockerhub.ebi.ac.uk"
DOCKER_REGISTRY: "dockerhub.ebi.ac.uk/gdp-public"
SINGULARITY_REGISTRY: "oras://dockerhub.ebi.ac.uk/gdp-public/hattivatti/singularity"
SINGULARITY_VERSION: "3.8.3"
jobs:
build_docker_dev:
name: build docker development image
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
with:
platforms: arm64
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
registry: ${{ env.DOCKER_REGISTRY_LOGIN }}
username: ${{ env.REGISTRY_USERNAME }}
password: ${{ env.REGISTRY_TOKEN }}
- name: Build and push
uses: docker/build-push-action@v3
with:
push: true
platforms: "linux/amd64"
tags: ${{ env.DOCKER_REGISTRY }}/hattivatti:dev
build_singularity_dev:
needs: build_docker_dev
name: build singularity development image
runs-on: ubuntu-latest
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
- name: Cache singularity setup
id: cache-singularity
uses: actions/cache@v3
with:
path: /opt/hostedtoolcache/singularity/${{ env.SINGULARITY_VERSION }}/x64
key: ${{ runner.os }}-singularity-${{ env.SINGULARITY_VERSION }}
- name: Set up Singularity
uses: eWaterCycle/setup-singularity@v7
if: steps.cache-singularity.outputs.cache-hit != 'true'
with:
singularity-version: ${{ env.SINGULARITY_VERSION }}
- name: Add singularity to path
if: steps.cache-singularity.outputs.cache-hit == 'true'
run: |
echo "/opt/hostedtoolcache/singularity/${{ env.SINGULARITY_VERSION }}/x64/bin" >> $GITHUB_PATH
- name: Build singularity image
run: singularity build img.sif "docker://${DOCKER_REGISTRY}/hattivatti:dev"
- name: Push singularity image
run: |
echo "$REGISTRY_TOKEN" | singularity remote login -u "$REGISTRY_USERNAME" --password-stdin "$SINGULARITY_REGISTRY_LOGIN"
singularity push img.sif "${SINGULARITY_REGISTRY}/hattivatti:dev"
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment