feat: update toolset (#221) #221
This file contains hidden or 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: | |
| push: | |
| branches: | |
| - coatl | |
| paths: | |
| - .github/workflows/docker-build-push-multi-registry.yml | |
| - .github/workflows/publish.yml | |
| - Dockerfile | |
| jobs: | |
| tagger: | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| outputs: | |
| python312-version: ${{ steps.tags.outputs.python312-version }} | |
| python312-version-major-minor: ${{ steps.tags.outputs.python312-version-major-minor }} | |
| git-version: ${{ steps.tags.outputs.git-version }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Extract version number | |
| id: tags | |
| run: | | |
| # Extract the Python version from the Dockerfile | |
| PYTHON312_VERSION=$(grep 'ENV PYTHON312_VERSION' Dockerfile | cut -d '=' -f 2) | |
| echo "PYTHON312_VERSION=${PYTHON312_VERSION}" | |
| # Trim the version to the first two segments (major.minor) | |
| PYTHON312_VERSION_MAJOR_MINOR=$(echo $PYTHON312_VERSION | cut -d'.' -f1-2) | |
| echo "PYTHON312_VERSION_MAJOR_MINOR=${PYTHON312_VERSION_MAJOR_MINOR}" | |
| # Export the extracted version to GITHUB_OUTPUT | |
| echo "python312-version=${PYTHON312_VERSION}" >> $GITHUB_OUTPUT | |
| echo "python312-version-major-minor=${PYTHON312_VERSION_MAJOR_MINOR}" >> $GITHUB_OUTPUT | |
| # Extract the Git version from the Dockerfile | |
| GIT_VERSION=$(grep 'ENV GIT_VERSION' Dockerfile | cut -d '=' -f 2) | |
| echo "GIT_VERSION=${GIT_VERSION}" | |
| echo "git-version=${GIT_VERSION}" >> $GITHUB_OUTPUT | |
| build: | |
| needs: tagger | |
| uses: ./.github/workflows/docker-build-push-multi-registry.yml | |
| with: | |
| dockerhub-repo: coatldev/six | |
| dockerhub-username: ${{ vars.DOCKERHUB_USERNAME }} | |
| quay-repo: quay.io/coatldev/six | |
| quay-username: ${{ vars.QUAY_USERNAME }} | |
| metadata-tags: | | |
| type=raw,value=${{ needs.tagger.outputs.python312-version }} | |
| type=raw,value=${{ needs.tagger.outputs.python312-version-major-minor }} | |
| type=raw,value=${{ needs.tagger.outputs.python312-version }}-${{ needs.tagger.outputs.git-version }} | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| secrets: | |
| dockerhub-password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| quay-password: ${{ secrets.QUAY_ROBOT_TOKEN }} |