Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
H
hattivatti
Manage
Activity
Members
Labels
Plan
Issues
0
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
GDP-Public
hattivatti
Commits
9d6d4c6f
Commit
9d6d4c6f
authored
1 year ago
by
Benjamin Wingfield
Browse files
Options
Downloads
Patches
Plain Diff
set up dockerfile + action
parent
593da8df
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.github/workflows/push_dev.yml
+78
-0
78 additions, 0 deletions
.github/workflows/push_dev.yml
Dockerfile
+13
-0
13 additions, 0 deletions
Dockerfile
with
91 additions
and
0 deletions
.github/workflows/push_dev.yml
0 → 100644
+
78
−
0
View file @
9d6d4c6f
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/hattivatti"
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,linux/arm64"
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"
This diff is collapsed.
Click to expand it.
Dockerfile
0 → 100644
+
13
−
0
View file @
9d6d4c6f
FROM
--platform=linux/amd64 rust:bookworm
AS
build
WORKDIR
/opt/build
COPY
. ./
RUN
cargo build
--target
x86_64-unknown-linux-gnu
FROM
--platform=linux/amd64 debian:stable-slim
COPY
--from=build /opt/build/target/x86_64-unknown-linux-gnu/debug/hattivatti /opt/
CMD
["/opt/hattivatti"]
\ No newline at end of file
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment