Implement i18n flow and strict category code migration #14
Workflow file for this run
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: Build and Publish Docker Image | |
| on: | |
| push: | |
| tags: | |
| - 'v[0-9]+.*' | |
| workflow_dispatch: | |
| inputs: | |
| version: | |
| description: 'Semver (e.g. 1.2.3)' | |
| required: false | |
| type: string | |
| env: | |
| # Use docker.io for Docker Hub if empty | |
| REGISTRY: ${{ github.repository_owner }} | |
| # GitHub repository name | |
| IMAGE_NAME: ${{ github.event.repository.name }} | |
| jobs: | |
| build-and-push: | |
| name: Build and push Docker image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| # id-token is used for OIDC token generation for secure authentication | |
| id-token: write | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Install buildx | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| driver-opts: | | |
| image=moby/buildkit:master | |
| install: true | |
| # Login against a Docker registry | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| # Extract metadata (tags, labels) for Docker | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| # From Git tags (e.g., refs/tags/v1.2.3) | |
| type=semver,pattern={{version}} | |
| type=semver,pattern={{major}}.{{minor}} | |
| # From manual input, if provided (expects 1.2.3) | |
| # Full version (unprefixed): 1.2.3 | |
| type=semver,pattern={{version}},value=${{ github.event.inputs.version }},enable=${{ github.event.inputs.version != '' }} | |
| # Also derive major.minor: 1.2 | |
| type=semver,pattern={{major}}.{{minor}},value=${{ github.event.inputs.version }},enable=${{ github.event.inputs.version != '' }} | |
| # Build and push Docker image with Buildx | |
| - name: Build and push Docker image | |
| id: docker_build | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| file: ./Dockerfile | |
| push: true | |
| platforms: linux/amd64,linux/arm64 | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| # Output the Docker image digest | |
| - name: Image digest | |
| run: echo ${{ steps.docker_build.outputs.digest }} |