ci: move eventsse chart under monorepo #15
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: eventrouter-release-pullrequest | |
| on: | |
| pull_request: | |
| paths: | |
| - 'eventrouter/**' | |
| - '.github/workflows/eventrouter-release-pullrequest.yaml' | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| env: | |
| MODULE: eventrouter | |
| GHCR_REPO: ghcr.io/${{ github.repository }} | |
| jobs: | |
| build-and-push: | |
| name: Build and NOT Push Multi-Arch Image | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Extract version | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/${{ env.MODULE }}/} | |
| echo "VERSION=$VERSION" >> $GITHUB_ENV | |
| echo "LATEST_TAG=latest" >> $GITHUB_ENV | |
| - name: Docker meta | |
| id: meta | |
| uses: docker/metadata-action@v5 | |
| with: | |
| images: ${{ env.GHCR_REPO }}/${{ env.MODULE }} | |
| tags: | | |
| type=raw,value=${{ env.VERSION }} | |
| type=raw,value=${{ env.LATEST_TAG }} | |
| - name: Login to GHCR | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| install: true | |
| - name: Build and NOT push multi-arch image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./eventrouter | |
| file: ./eventrouter/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: false | |
| labels: ${{ steps.meta.outputs.labels }} | |
| tags: ${{ steps.meta.outputs.tags }} | |
| # Usa cache GitHub anziché push su :cache | |
| cache-from: type=gha | |
| cache-to: type=gha,mode=max | |
| - name: Inspect local image | |
| run: | | |
| docker buildx imagetools inspect ${{ env.GHCR_REPO }}/${{ env.MODULE }}:${{ env.LATEST_TAG }} |