Skip to content

Commit

Permalink
add build action
Browse files Browse the repository at this point in the history
  • Loading branch information
ESCRI11 committed Nov 10, 2024
1 parent aa6fb35 commit f6cfeb3
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build and Tag Docker Image

on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Extract version from DESCRIPTION
id: get_version
run: |
# Extract version from DESCRIPTION file
version=$(grep '^Version:' /DESCRIPTION | awk '{print $2}')
echo "package_version=$version" >> $GITHUB_ENV
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Build Docker image
run: |
docker build -t brgelab/rock-omics:${{ env.package_version }} -f docker/Dockerfile_dsOmics .
- name: Tag Docker image as latest
run: |
docker tag brgelab/rock-omics:${{ env.package_version }} brgelab/rock-omics:latest
- name: Push Docker image to Docker Hub
run: |
docker push brgelab/rock-omics:${{ env.package_version }}
docker push brgelab/rock-omics:latest

0 comments on commit f6cfeb3

Please sign in to comment.