Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Publish docker images to GHCR #5

Merged
merged 5 commits into from
Nov 12, 2024
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
59 changes: 59 additions & 0 deletions .github/workflows/push-ghcr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Push Images to GitHub Container Registry

on:
push:
branches:
- main
pull_request:

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
submodules: recursive

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

- name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ secrets.GHCR_USERNAME }}
password: ${{ secrets.GHCR_TOKEN }}

# Build and push blocklock-agent
- name: Build and push blocklock-agent
uses: docker/build-push-action@v4
with:
context: .
file: ./blocklock-agent/Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
ghcr.io/${{ github.repository }}/blocklock-agent:latest

# Build and push anvil
- name: Build and push anvil
uses: docker/build-push-action@v4
with:
context: ./anvil/
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
ghcr.io/${{ github.repository }}/anvil:latest

# Build and push bls-bn254-js
- name: Build and push bls-bn254-js
uses: docker/build-push-action@v4
with:
context: .
file: ./bls-bn254-js/Dockerfile
push: ${{ github.ref == 'refs/heads/main' }}
tags: |
ghcr.io/${{ github.repository }}/bls-bn254-js:latest

- name: Logout from GitHub Container Registry
run: docker logout ghcr.io
8 changes: 4 additions & 4 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ services:
build:
context: ./anvil
container_name: anvil-container
image: custom-anvil-image:latest
image: ghcr.io/randa-mu/devcon-2024-timelock-workshop/anvil:latest
ports:
- "8545:8545"
networks:
- timelock-net

blocklock:
platform: linux/x86_64
build:
build:
context: .
dockerfile: blocklock-agent/Dockerfile
container_name: blocklock-container
image: custom-blocklock-image:latest
image: ghcr.io/randa-mu/devcon-2024-timelock-workshop/blocklock-agent:latest
ports:
- "8081:8080"
environment:
Expand All @@ -34,7 +34,7 @@ services:
context: .
dockerfile: bls-bn254-js/Dockerfile
container_name: bls-bn254-js-container
image: custom-bls-bn254-js-image:latest
image: ghcr.io/randa-mu/devcon-2024-timelock-workshop/bls-bn254-js:latest
depends_on:
- anvil
- blocklock
Expand Down
Loading