Skip to content

Merge pull request #29 from metagenlab/dev #22

Merge pull request #29 from metagenlab/dev

Merge pull request #29 from metagenlab/dev #22

name: Publish Docker image
on:
push:
branches: [main]
paths:
- "Dockerfile"
- ".github/workflows/docker-publish.yml"
- "tests/**"
- "mess/**"
- "setup.py"
- "!docs/**"
- "!README.md"
release:
types: [published]
jobs:
push_to_registry:
if: github.repository == 'metagenlab/MeSS'
name: Build + Push Docker image
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Push dev image
uses: docker/build-push-action@v6
if: github.event_name == 'push'
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/metagenlab/mess:dev
- name: Push release image
uses: docker/build-push-action@v6
if: github.event_name == 'release'
with:
platforms: linux/amd64,linux/arm64
push: true
tags: |
ghcr.io/metagenlab/mess:${{ github.event.release.tag_name }}
ghcr.io/metagenlab/mess:latest