Skip to content

feat: adapt check exchange policy for bundle offers #164

feat: adapt check exchange policy for bundle offers

feat: adapt check exchange policy for bundle offers #164

name: Publish 'boson-protocol-node' Docker image
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
env:
GH_REGISTRY: ghcr.io
GH_IMAGE_NAME: "${{ github.repository }}/boson-protocol-node"
DH_REGISTRY: docker.io
DH_NAMESPACE: ${{ vars.BSN_DOCKER_LOGIN }}
DH_REPOSITORY: boson-protocol-node
jobs:
push_to_registries:
name: Push Docker image to multiple registries
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ${{ env.GH_REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ vars.BSN_DOCKER_LOGIN }}
password: ${{ secrets.BSN_DOCKER_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: |
${{ env.GH_REGISTRY }}/${{ env.GH_IMAGE_NAME }}
${{ env.DH_NAMESPACE }}/${{ env.DH_REPOSITORY }}
- name: Build and push Docker images
id: push
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: .
file: contracts/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Generate artifact attestation
uses: actions/attest-build-provenance@v2
with:
subject-name: ${{ env.GH_REGISTRY }}/${{ env.GH_IMAGE_NAME }}
subject-digest: ${{ steps.push.outputs.digest }}
push-to-registry: true
github-token: ${{ secrets.GITHUB_TOKEN }}