name: Publish Explorer Docker Image on: workflow_dispatch: inputs: tag: description: "Docker image tag to use" required: true default: "latest" env: REGISTRY: ghcr.io IMAGE_NAME: ${{ github.repository_owner }}/logos-blockchain-explorer jobs: build-and-push: runs-on: ubuntu-latest permissions: packages: write contents: read steps: - name: Check out the repo uses: actions/checkout@v4 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v3 - name: Log in to the Container registry uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} username: ${{ github.actor }} password: ${{ secrets.GITHUB_TOKEN }} - name: Build and push id: push uses: docker/build-push-action@v6 with: context: . file: ./Dockerfile platforms: linux/amd64,linux/arm64 push: true tags: | ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.tag }} cache-from: type=gha cache-to: type=gha,mode=max - name: Summary run: | echo "Image published to ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ inputs.tag }}"