Skip to content

Commit

Permalink
ci: fix demo compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
gytis-ivaskevicius committed Dec 19, 2024
1 parent ee0d46f commit defc8eb
Showing 1 changed file with 80 additions and 74 deletions.
154 changes: 80 additions & 74 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,96 +6,102 @@ on:
- docker-stuff

jobs:
push_to_registry:
name: Push Docker image to GHCR
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
attestations: write
id-token: write
steps:
- name: Check out the repo
uses: actions/checkout@v4
# push_to_registry:
# name: Push Docker image to GHCR
# 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: Set up Docker Buildx
uses: docker/[email protected]
# - name: Set up Docker Buildx
# uses: docker/[email protected]

- name: Log in to GHCR
uses: docker/[email protected]
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Log in to GHCR
# uses: docker/[email protected]
# with:
# registry: ghcr.io
# username: ${{ github.actor }}
# password: ${{ secrets.GITHUB_TOKEN }}

- name: Cargo Cache
id: cache
uses: actions/cache@v4
with:
path: |
cargo-registry-cache
sccache-cache
key: ${{ runner.os }}-cargo-cache-${{ github.sha }}
restore-keys: |
${{ runner.os }}-cargo-cache
# - name: Cargo Cache
# id: cache
# uses: actions/cache@v4
# with:
# path: |
# cargo-registry-cache
# sccache-cache
# key: ${{ runner.os }}-cargo-cache-${{ github.sha }}
# restore-keys: |
# ${{ runner.os }}-cargo-cache

- name: inject cargo caches into docker
uses: reproducible-containers/[email protected]
with:
cache-map: |
{
"cargo-registry-cache": "/usr/local/cargo/registry",
"sccache-cache": "/sccache"
}
skip-extraction: ${{ steps.cache.outputs.cache-hit }}
# - name: inject cargo caches into docker
# uses: reproducible-containers/[email protected]
# with:
# cache-map: |
# {
# "cargo-registry-cache": "/usr/local/cargo/registry",
# "sccache-cache": "/sccache"
# }
# skip-extraction: ${{ steps.cache.outputs.cache-hit }}

- name: Extract Docker metadata for firefly-cardanoconnect
id: firefly-cardanoconnect-meta
uses: docker/[email protected]
with:
images: ghcr.io/blockfrost/firefly-cardanoconnect
- name: Build and push Docker image for firefly-cardanoconnect
id: firefly-cardanoconnect-push
uses: docker/[email protected]
with:
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: ./Dockerfile
target: firefly-cardanoconnect
push: true
tags: ${{ steps.firefly-cardanoconnect-meta.outputs.tags }}
labels: ${{ steps.firefly-cardanoconnect-meta.outputs.labels }}
# - name: Extract Docker metadata for firefly-cardanoconnect
# id: firefly-cardanoconnect-meta
# uses: docker/[email protected]
# with:
# images: ghcr.io/blockfrost/firefly-cardanoconnect
# - name: Build and push Docker image for firefly-cardanoconnect
# id: firefly-cardanoconnect-push
# uses: docker/[email protected]
# with:
# cache-from: type=gha
# cache-to: type=gha,mode=max
# context: .
# file: ./Dockerfile
# target: firefly-cardanoconnect
# push: true
# tags: ${{ steps.firefly-cardanoconnect-meta.outputs.tags }}
# labels: ${{ steps.firefly-cardanoconnect-meta.outputs.labels }}

- name: Extract Docker metadata for firefly-cardanosigner
id: firefly-cardanosigner-meta
uses: docker/[email protected]
with:
images: ghcr.io/blockfrost/firefly-cardanosigner
- name: Build and push Docker image for firefly-cardanosigner
id: firefly-cardanosigner-push
uses: docker/[email protected]
with:
registry: ghcr.io
cache-from: type=gha
cache-to: type=gha,mode=max
context: .
file: ./Dockerfile
target: firefly-cardanosigner
push: true
tags: ${{ steps.firefly-cardanosigner-meta.outputs.tags }}
labels: ${{ steps.firefly-cardanosigner-meta.outputs.labels }}
# - name: Extract Docker metadata for firefly-cardanosigner
# id: firefly-cardanosigner-meta
# uses: docker/[email protected]
# with:
# images: ghcr.io/blockfrost/firefly-cardanosigner
# - name: Build and push Docker image for firefly-cardanosigner
# id: firefly-cardanosigner-push
# uses: docker/[email protected]
# with:
# registry: ghcr.io
# cache-from: type=gha
# cache-to: type=gha,mode=max
# context: .
# file: ./Dockerfile
# target: firefly-cardanosigner
# push: true
# tags: ${{ steps.firefly-cardanosigner-meta.outputs.tags }}
# labels: ${{ steps.firefly-cardanosigner-meta.outputs.labels }}

demo:
name: Run Demo
runs-on: ubuntu-latest
needs: push_to_registry
# needs: push_to_registry
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Start docker-compose
run: docker compose -f ./infra/docker-compose.yaml -p preview up -d --no-build
- name: Add just
uses: extractions/setup-just@v2
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
- name: Add wasm32-unknown-unknown target
run: rustup target add wasm32-unknown-unknown
- name: Run demo
run: just demo

0 comments on commit defc8eb

Please sign in to comment.