Skip to content

add debug lib to CURL to avoid 'warning LNK4098: defaultlib 'MSVCRT' … #170

add debug lib to CURL to avoid 'warning LNK4098: defaultlib 'MSVCRT' …

add debug lib to CURL to avoid 'warning LNK4098: defaultlib 'MSVCRT' … #170

name: Deploy manylinux docker image to ghrc.io
on:
workflow_dispatch:
push:
branches:
- master
- 'release/**'
jobs:
Deploy:
runs-on: ${{ matrix.arch == 'amd64' && 'ubuntu-latest' || 'ubuntu-22.04-arm' }}
strategy:
matrix:
arch: [amd64, arm64]
outputs:
tag_name: ${{ steps.tag_name.outputs.tag }}
steps:
- name: Extract branch name
shell: bash
# export branch name to be available in the GA environment as: steps.extract_branch.outputs.branch
run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT
id: extract_branch
- name: Define tag name
shell: bash
run: |
BRANCH=${{ steps.extract_branch.outputs.branch }}
## use latest to follow docker conventions
if [[ "$BRANCH" == "master" ]]
then
BRANCH="latest"
fi
## Remove release/ from release branch name
## export tag name (latest or version number) to be available in the GA environment as: steps.tag_name.outputs.tag
echo "tag=$(echo ${BRANCH#release/})" >> $GITHUB_OUTPUT
id: tag_name
- name: Downcase REPO
run: echo "repo=$(echo ${GITHUB_REPOSITORY,,})" >> $GITHUB_OUTPUT
id: downcase_repo
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Checkout to make context with dockerfiles available
uses: actions/checkout@v4
- name: Set architecture-specific variables
run: |
if [[ "${{ matrix.arch }}" == "amd64" ]]; then
echo "dockerfile=dockerfiles/pyopenms/manylinux/Dockerfile" >> $GITHUB_ENV
echo "platform_tag=amd64" >> $GITHUB_ENV
echo "docker_platform=linux/amd64" >> $GITHUB_ENV
else
echo "dockerfile=dockerfiles/pyopenms/manylinux/ARM64_Dockerfile" >> $GITHUB_ENV
echo "platform_tag=arm64" >> $GITHUB_ENV
echo "docker_platform=linux/arm64" >> $GITHUB_ENV
fi
- name: Build and Push Docker Image (${{ matrix.arch }})
uses: docker/build-push-action@v3
with:
push: true
file: ${{ env.dockerfile }}
context: .
platforms: ${{ env.docker_platform }}
build-args: |
OPENMS_BRANCH=${{ steps.extract_branch.outputs.branch }}
OPENMS_VERSION=${{ steps.tag_name.outputs.tag }}
tags: |
ghcr.io/openms/contrib_manylinux_2_34:${{ steps.tag_name.outputs.tag }}-${{ env.platform_tag }}
create-multiarch-manifest:
needs: Deploy
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create multi-arch manifest
run: |
docker buildx imagetools create \
-t ghcr.io/openms/contrib_manylinux_2_34:${{ needs.Deploy.outputs.tag_name }} \
ghcr.io/openms/contrib_manylinux_2_34:${{ needs.Deploy.outputs.tag_name }}-amd64 \
ghcr.io/openms/contrib_manylinux_2_34:${{ needs.Deploy.outputs.tag_name }}-arm64