Skip to content

cd

cd #448

Workflow file for this run

name: cd
on:
pull_request:
branches: [main]
types: [closed]
workflow_dispatch:
jobs:
build_push_metatlas_shifter_image:
name: Build/push doejgi/metatlas_shifter docker image
if: github.repository == 'biorack/metatlas' && (github.event.pull_request.merged || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: generate version_info file
run: python ./docker/most_recent_commits.py > docker/.version_info
- name: generate time based tag
id: timestamp
run: |
DATE_TIME=$(date -u +"%Y%m%d_%H%M%S")
echo "date_time=${DATE_TIME}" >> $GITHUB_OUTPUT
- name: Build Docker images # This is for the targeted metatlas pipeline
id: build
uses: docker/build-push-action@v5
with:
context: ./docker
file: ./docker/Dockerfile.shifter
platforms: linux/amd64
cache-from: type=registry,ref=ghcr.io/biorack/metatlas/metatlas_shifter:latest
cache-to: type=inline
tags: |
ghcr.io/biorack/metatlas/metatlas_shifter:${{ steps.timestamp.outputs.date_time }}
ghcr.io/biorack/metatlas/metatlas_shifter:latest
push: true
build_push_metatlas_analysis_image:
name: Build/push analysis docker image
if: github.repository == 'biorack/metatlas' && (github.event.pull_request.merged || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: generate time based tag
id: timestamp
run: |
DATE_TIME=$(date -u +"%Y%m%d_%H%M%S")
echo "date_time=${DATE_TIME}" >> $GITHUB_OUTPUT
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker images # This is for the boutique analysis tasks
id: build_analysis
uses: docker/build-push-action@v5
with:
context: ./docker
file: ./docker/Dockerfile.analysis
platforms: linux/amd64
cache-from: type=registry,ref=ghcr.io/biorack/metatlas/analysis:latest
cache-to: type=inline
tags: |
ghcr.io/biorack/metatlas/analysis:${{ steps.timestamp.outputs.date_time }}
ghcr.io/biorack/metatlas/analysis:latest
push: true
build_push_metatlas_mzmine_image:
name: Build/push mzmine docker image
if: github.repository == 'biorack/metatlas' && (github.event.pull_request.merged || github.event_name == 'workflow_dispatch')
runs-on: ubuntu-22.04
steps:
- name: Checkout source
uses: actions/checkout@v4
- name: generate time based tag
id: timestamp
run: |
DATE_TIME=$(date -u +"%Y%m%d_%H%M%S")
echo "date_time=${DATE_TIME}" >> $GITHUB_OUTPUT
- name: Login to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker images # This is for the mzmine container
id: build_mzmine
uses: docker/build-push-action@v5
with:
context: ./docker
file: ./docker/Dockerfile.mzmine
platforms: linux/amd64
cache-from: type=registry,ref=ghcr.io/biorack/metatlas/mzmine:latest
cache-to: type=inline
tags: |
ghcr.io/biorack/metatlas/mzmine:${{ steps.timestamp.outputs.date_time }}
ghcr.io/biorack/metatlas/mzmine:latest
push: true