feat: restore event first and last time info (#44) #2
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: eventrouter-release-tag | |
| on: | |
| push: | |
| tags: | |
| - 'eventrouter/[0-9]+.[0-9]+.[0-9]+' | |
| env: | |
| MODULE: eventrouter | |
| GHCR_REPO: ghcr.io/${{ github.repository }} | |
| jobs: | |
| build-and-push: | |
| name: Build and 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 push multi-arch image | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: ./eventrouter | |
| file: ./eventrouter/Dockerfile | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| 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 pushed image | |
| run: | | |
| docker buildx imagetools inspect ${{ env.GHCR_REPO }}/${{ env.MODULE }}:${{ env.VERSION }} | |
| docker buildx imagetools inspect ${{ env.GHCR_REPO }}/${{ env.MODULE }}:${{ env.LATEST_TAG }} |