Skip to content

chore(requirements): pip-compile upgrade (#194) #136

chore(requirements): pip-compile upgrade (#194)

chore(requirements): pip-compile upgrade (#194) #136

Workflow file for this run

name: publish
on:
push:
branches:
- 'coatl'
paths:
- 'requirements/**'
- 'Dockerfile'
- 'entrypoint.sh'
jobs:
tagger:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.tags.outputs.version }}
major_minor: ${{ steps.tags.outputs.major_minor }}
major: ${{ steps.tags.outputs.major }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version number
id: tags
run: |
# Extract the Python version from the Dockerfile
VERSION=$(grep -oP 'devpi-server==\K[0-9]+\.[0-9]+\.[0-9]+' requirements/devpi.txt)
echo "VERSION=${VERSION}"
# Trim the version to the first two segments (major.minor)
MAJOR_MINOR=$(echo "$VERSION" | grep -oP '[0-9]+\.[0-9]+')
echo "MAJOR_MINOR=${MAJOR_MINOR}"
# Trim the version to the first segment (major)
MAJOR=$(echo "$MAJOR_MINOR" | grep -oP '^[0-9]+')
echo "MAJOR=${MAJOR}"
# Export the extracted version to GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "major_minor=${MAJOR_MINOR}" >> $GITHUB_OUTPUT
echo "major=${MAJOR}" >> $GITHUB_OUTPUT
build:
needs: tagger
uses: coatl-dev/workflows/.github/workflows/docker-build-push-multi-registry.yml@v4
with:
dockerhub-repo: coatldev/devpi
dockerhub-username: ${{ vars.DOCKERHUB_USERNAME }}
quay-repo: quay.io/coatldev/devpi
quay-username: ${{ vars.QUAY_USERNAME }}
metadata-tags: |
${{ needs.tagger.outputs.version }}
${{ needs.tagger.outputs.major_minor }}
${{ needs.tagger.outputs.major }}
latest-tag-flavor: 'true'
secrets:
dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }}
quay-password: ${{ secrets.QUAY_ROBOT_TOKEN }}