Support custom TLS certs for generating CRSs #704
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: Docker Build and Push | |
| on: | |
| push: | |
| branches: [ main ] | |
| tags: | |
| - 'v*' | |
| pull_request: | |
| branches: [ main ] | |
| env: | |
| REGISTRY: quay.io | |
| IMAGE_NAME: rhacs-eng/roxie | |
| jobs: | |
| docker-build-push: | |
| if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.repository | |
| name: Build and Push Multi-arch Image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version-file: go.mod | |
| cache: true | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v4 | |
| - name: Log in to Quay.io | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ${{ env.REGISTRY }} | |
| username: ${{ secrets.REGISTRY_USERNAME }} | |
| password: ${{ secrets.REGISTRY_TOKEN }} | |
| - name: Get build metadata | |
| id: build-meta | |
| run: | | |
| echo "version=$(make version)" >> $GITHUB_OUTPUT | |
| echo "build_date=$(make get-build-date)" >> $GITHUB_OUTPUT | |
| - name: Extract metadata (tags, labels) for Docker | |
| id: meta | |
| uses: docker/metadata-action@v6 | |
| with: | |
| images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
| tags: | | |
| # Tag with 'latest' for main branch. | |
| type=raw,value=latest,enable={{is_default_branch}} | |
| # Tag with version string from 'make version'. | |
| type=raw,value=${{ steps.build-meta.outputs.version }} | |
| - name: Build and push Docker image | |
| id: docker_build | |
| uses: docker/build-push-action@v7 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: ${{ steps.meta.outputs.tags }} | |
| labels: ${{ steps.meta.outputs.labels }} | |
| build-args: | | |
| ROXIE_VERSION=${{ steps.build-meta.outputs.version }} | |
| BUILD_DATE=${{ steps.build-meta.outputs.build_date }} | |
| cache-from: | | |
| type=gha | |
| type=registry,ref=${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:buildcache | |
| cache-to: type=gha,mode=max | |
| - name: Image digest | |
| run: echo "Image pushed with digest ${{ steps.docker_build.outputs.digest }}" |