Skip to content

Commit fe3cc03

Browse files
authored
Merge pull request #3 from TRON-Bioinformatics/docker-build
Docker build
2 parents 2b43f7f + 7db18cf commit fe3cc03

2 files changed

Lines changed: 40 additions & 1 deletion

File tree

.github/workflows/docker-build.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Build and Push Docker Image
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
build-and-push:
10+
runs-on: ubuntu-24.04
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v4
14+
15+
- name: Set up Docker Buildx
16+
uses: docker/setup-buildx-action@v3
17+
18+
- name: Log in to GitHub Container Registry
19+
uses: docker/login-action@v3
20+
with:
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
25+
- name: Derive lowercase repo slug
26+
run: echo "GITHUB_REPOSITORY_OWNER_LOWERCASE=${GITHUB_REPOSITORY_OWNER,,}" >> $GITHUB_ENV
27+
28+
- name: Get latest release version
29+
id: get_latest_release
30+
run: |
31+
latest_release=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases/latest | jq -r .tag_name)
32+
echo "LATEST_RELEASE=$latest_release" >> $GITHUB_ENV
33+
34+
- name: Build and push Docker image
35+
uses: docker/build-push-action@v5
36+
with:
37+
file: ./Docker/Dockerfile
38+
push: true
39+
tags: ghcr.io/${{ env.GITHUB_REPOSITORY_OWNER_LOWERCASE }}/splice2neo:${{ env.LATEST_RELEASE }}

Docker/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM docker://rocker/r-ver:4.2.3
1+
FROM rocker/r-ver:4.2.3
22

33
ENV SRC /usr/local/src
44
ENV BIN /usr/local/bin

0 commit comments

Comments
 (0)