Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 44 additions & 44 deletions .github/workflows/build-images.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,88 +2,88 @@ name: Build and publish Docker images for Energy Tracker

on:
push:
branches: [ "staging" ]
branches: [ "staging", "main" ]
pull_request:
branches: [ "staging", "main" ]

env:
REGISTRY: ghcr.io
PROVER_IMAGE_NAME: ${{ github.repository }}
STREAMR_IMAGE_NAME: ${{ github.repository }}/streamr-client


jobs:
build-and-push-prover-image:
build-and-push-images:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Log in to the Container registry

- name: Set up QEMU
uses: docker/setup-qemu-action@v3
with:
platforms: arm64

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7

# Build and push Prover image (energy-tracker)
- name: Extract metadata for Prover image
id: meta-prover
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.PROVER_IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4

- name: Build and push Prover image
uses: docker/build-push-action@v6
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
tags: ${{ steps.meta-prover.outputs.tags }}
labels: ${{ steps.meta-prover.outputs.labels }}

- name: Generate attestation for Prover image
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@v3
with:
subject-name: ${{ env.REGISTRY }}/${{ env.PROVER_IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
subject-digest: ${{ steps.build-and-push-prover.outputs.digest }}
push-to-registry: true

build-and-push-streamr-image:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v5
- name: Log in to the Container registry
if: github.event_name != 'pull_request'
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
# Build and push Streamr client image
- name: Extract metadata for Streamr client image
id: meta-streamr
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.STREAMR_IMAGE_NAME }}
- name: Build and push Docker image
id: push
uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4

- name: Build and push Streamr client image
uses: docker/build-push-action@v6
with:
context: ./streamr-client
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
tags: ${{ steps.meta-streamr.outputs.tags }}
labels: ${{ steps.meta-streamr.outputs.labels }}

- name: Generate attestation for Streamr client image
if: github.event_name != 'pull_request'
uses: actions/attest-build-provenance@v3
with:
subject-name: ${{ env.REGISTRY }}/${{ env.STREAMR_IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
subject-digest: ${{ steps.build-and-push-streamr.outputs.digest }}
push-to-registry: true
51 changes: 0 additions & 51 deletions .github/workflows/docker-image-prover.yml

This file was deleted.

51 changes: 0 additions & 51 deletions .github/workflows/docker-image-streamr-client.yml

This file was deleted.

Loading