Skip to content

ci(publish): set build-digest-key to prevent name clashes (#132) #98

ci(publish): set build-digest-key to prevent name clashes (#132)

ci(publish): set build-digest-key to prevent name clashes (#132) #98

Workflow file for this run

name: publish
on:
push:
branches:
- 'coatl'
paths:
- '.github/workflows/publish.yml'
- 'Dockerfile'
schedule:
- cron: '0 20 * * 2,6'
env:
REGISTRY_IMAGE: coatldev/six
jobs:
tagger:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.tags.outputs.version }}
major_minor: ${{ steps.tags.outputs.major_minor }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract version number
id: tags
run: |
# Extract the Python version from the Dockerfile
VERSION=$(grep 'ENV PYTHON3_VERSION' Dockerfile | cut -d '=' -f 2)
echo "VERSION=${VERSION}"
# Trim the version to the first two segments (major.minor)
MAJOR_MINOR=$(echo $VERSION | cut -d'.' -f1-2)
echo "MAJOR_MINOR=${MAJOR_MINOR}"
# Export the extracted version to GITHUB_OUTPUT
echo "version=${VERSION}" >> $GITHUB_OUTPUT
echo "major_minor=${MAJOR_MINOR}" >> $GITHUB_OUTPUT
docker:
needs: tagger
uses: coatl-dev/workflows/.github/workflows/docker-build-push-multi-platform.yml@v4
with:
registry-image: coatldev/six
metadata-tags: |
type=raw,value=${{ needs.tagger.outputs.version }}
type=raw,value=${{ needs.tagger.outputs.major_minor }}
type=raw,value=latest,enable={{is_default_branch}}
registry-username: ${{ vars.DOCKERHUB_USERNAME }}
build-digest-key: docker
build-provenance: true
secrets:
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}
quay:
needs:
- tagger
- docker
uses: coatl-dev/workflows/.github/workflows/docker-build-push-multi-platform.yml@v4
with:
registry-image: quay.io/coatldev/six
metadata-tags: |
type=raw,value=${{ needs.tagger.outputs.version }}
type=raw,value=${{ needs.tagger.outputs.major_minor }}
type=raw,value=latest,enable={{is_default_branch}}
registry-address: quay.io
registry-username: ${{ vars.QUAY_USERNAME }}
build-digest-key: quay
secrets:
registry-password: ${{ secrets.QUAY_ROBOT_TOKEN }}