Merge pull request #805 from garadar/Fix_inline_event_flag #126
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 Main Docker Image (with Docs) | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| DOCKERHUB_REGISTRY: docker.io | |
| GITHUB_REGISTRY: ghcr.io | |
| DOCKERHUB_IMAGE_NAME: ${{ secrets.DOCKER_USERNAME }}/${{ github.event.repository.name }} | |
| GITHUB_IMAGE_NAME: ${{ github.repository }} | |
| jobs: | |
| build-and-push-main: | |
| name: Build and push main Docker images (with docs) | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| variant: [debian, alpine] | |
| concurrency: | |
| group: main-docker-${{ github.ref }}-${{ matrix.variant }} | |
| cancel-in-progress: true | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| steps: | |
| - name: Check out the repo | |
| uses: actions/checkout@v4.2.2 | |
| - name: Install cosign | |
| uses: sigstore/cosign-installer@v3.8.0 | |
| with: | |
| cosign-release: v2.2.4 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3.8.0 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@v3.3.0 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Log in to GitHub Container Registry | |
| uses: docker/login-action@v3.3.0 | |
| with: | |
| registry: ${{ env.GITHUB_REGISTRY }} | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Extract Docker metadata | |
| id: meta | |
| uses: docker/metadata-action@v5.6.1 | |
| with: | |
| images: | | |
| ${{ env.DOCKERHUB_IMAGE_NAME }} | |
| ${{ env.GITHUB_REGISTRY }}/${{ env.GITHUB_IMAGE_NAME }} | |
| tags: | | |
| type=raw,value=main-with-docs,enable=${{ matrix.variant == 'debian' }} | |
| type=raw,value=main-with-docs-alpine,enable=${{ matrix.variant == 'alpine' }} | |
| type=sha,format=short,prefix=main-with-docs-,enable=${{ matrix.variant == 'debian' }} | |
| type=sha,format=short,prefix=main-with-docs-alpine-,enable=${{ matrix.variant == 'alpine' }} | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3.3.0 | |
| - name: Build and push Docker image | |
| id: build-and-push | |
| uses: docker/build-push-action@v6.13.0 | |
| with: | |
| context: . | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| VARIANT=${{ matrix.variant }} | |
| WITH_DOCS=true | |
| platforms: linux/amd64,linux/arm64 | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Sign the published Docker images | |
| env: | |
| TAGS: ${{ steps.meta.outputs.tags }} | |
| DIGEST: ${{ steps.build-and-push.outputs.digest }} | |
| run: | | |
| echo "${TAGS}" | xargs -I {} cosign sign --yes {}@${DIGEST} |