Skip to content

Build Docker

Build Docker #18

Workflow file for this run

name: Build Docker
on:
workflow_dispatch:
schedule:
- cron: "0 22 * * *"
push:
branches:
- main
repository_dispatch:
types: [docker]
jobs:
generate:
name: Build Docker
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- name: Docker meta
id: docker_meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/bimberlabinternal/discvr-base
tags: |
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=sha
- name: Set up QEMU
uses: docker/[email protected]
- name: Set up Docker Buildx
uses: docker/[email protected]
with:
# Use the previous version of buildx to force docker to save a V1 image,
# since Exacloud's outdated docker version cannot handle V2/OCI:
version: v0.9.1
- name: Login to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT }}
- name: Build and push
id: docker_build
uses: docker/[email protected]
with:
context: .
file: ./Dockerfile
build-args: |
"GH_PAT=${{ secrets.PAT }}"
pull: true
push: ${{github.ref == 'refs/heads/main'}}
tags: ghcr.io/bimberlabinternal/discvr-base:nightly,ghcr.io/bimberlabinternal/discvr-base:latest
labels: |
${{ steps.docker_meta.outputs.labels }}
org.opencontainers.image.title=discvr-base
org.opencontainers.image.description=The base docker image for various R packages
- name: Trigger cellhasR Docker
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: bimberlab/cellhashR
event-type: docker
- name: Trigger CellMembrane Docker
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: bimberlabinternal/CellMembrane
event-type: docker
- name: Trigger RIRA Docker
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: bimberlabinternal/RIRA
event-type: docker
- name: Trigger Rdiscvr Docker
uses: peter-evans/repository-dispatch@v3
with:
token: ${{ secrets.PAT }}
repository: bimberlabinternal/Rdiscvr
event-type: docker