This repository was archived by the owner on Jan 1, 2026. It is now read-only.
Add basic registration (#8) #6
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: Package Docker Image | |
| permissions: | |
| packages: write | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| jobs: | |
| docker: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Extract version | |
| id: version | |
| run: | | |
| VERSION=$(grep -oP '__version__\s*=\s*"\K[0-9]+\.[0-9]+\.[0-9]+' app/version.py) | |
| echo "tag=$VERSION" >> "$GITHUB_OUTPUT" | |
| - uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.actor }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Normalize image name | |
| run: | | |
| echo "REPO_LOWER=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV" | |
| - name: Build and push Docker image | |
| run: | | |
| IMAGE="ghcr.io/${REPO_LOWER}-image:${{ steps.version.outputs.tag }}" | |
| echo "🔨 Building image: $IMAGE" | |
| docker build -t "$IMAGE" . | |
| docker push "$IMAGE" |