fix(api): update data path #134
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish on Github container registry | |
on: | |
workflow_dispatch: | |
release: | |
type: [published] | |
push: | |
branches: | |
- main | |
pull_request: | |
types: | |
- opened | |
- reopened | |
env: | |
REGISTRY: ghcr.io | |
jobs: | |
build_and_push: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
# https://github.com/actions/checkout | |
- name: checkout repository | |
uses: actions/checkout@v4 | |
- name: lowercase image name | |
run: | | |
echo "IMAGE_NAME=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV} | |
- name: Get current release version | |
id: release-version | |
run: | | |
version=$(grep -E '^version += +' pyproject.toml | sed -E 's/.*= +//' | sed "s/['\"]//g") | |
echo "version=${version}" >> $GITHUB_OUTPUT | |
# https://github.com/docker/login-action | |
- name: Log in to the Container registry | |
uses: docker/login-action@v3.0.0 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
# https://github.com/docker/metadata-action | |
- name: Extract metadata (tags, labels) for Docker | |
id: meta | |
uses: docker/metadata-action@v5.0.0 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=raw,value=latest,enable=${{ github.event_name == 'push' || github.event_name == 'pull_request'}} | |
type=raw,value=${{ steps.release-version.outputs.version }},enable=${{ github.event_name == 'release' }} | |
# https://github.com/docker/build-push-action | |
- name: Push Docker image | |
uses: docker/build-push-action@v5.0.0 | |
with: | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
outputs: type=image,annotation-index.org.opencontainers.image.description=Serve multi-omics digital objects. |