Skip to content

Commit

Permalink
Add: Docker build and publish workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
artur-sannikov committed Jul 23, 2024
1 parent 3160d82 commit c856c62
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Publish Orchestrating Microbioma Analysis Docker image
on:
push:
branches: [docker]

env:
BIOC_VERSION: RELEASE_3_19-R-4.4.1
IMAGE_NAME: ${{ github.repository }}

jobs:
build_and_publish:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write
attestations: write
id-token: write

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ env.IMAGE_NAME }}

- name: Build and push Docker image
id: push
uses: docker/build-push-action@v6
with:
context: .
push: true
platforms: linux/amd64
build-args: BIOC_VERSION=${{ env.BIOC_VERSION }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

0 comments on commit c856c62

Please sign in to comment.