Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
e6b1e08
Update dependencies to point to the lightlink-network/reth repository…
sledro Sep 5, 2025
8c72681
Refactor fee calculation to exclude gasless transactions
sledro Sep 5, 2025
3e1e288
add ll worksflow to build & push image
sledro Sep 8, 2025
0db3a0c
Add Docker build workflow for image release
sledro Sep 9, 2025
4295479
Update Docker build workflow to use ubuntu-latest runner
sledro Sep 9, 2025
e5999e3
Refactor Docker build workflow to simplify runner configuration by us…
sledro Sep 9, 2025
6750f4c
Update dependencies in Cargo.lock to latest versions, including index…
sledro Sep 9, 2025
a5a89ef
Merge pull request #2 from lightlink-network/test/docker-ci
sledro Sep 9, 2025
e14e845
Remove ENTRYPOINT from Dockerfile for rbuilder runtime
sledro Sep 24, 2025
4779a8b
Add DockerfileOp for rbuilder build process and update workflow to us…
sledro Sep 25, 2025
f0aafb0
Update DockerfileOp to use official Rust image and install cargo-chef
sledro Sep 25, 2025
3228ab3
Remove obsolete build_and_publish workflow and update docker_build wo…
sledro Sep 25, 2025
60e837e
Enhance Docker build workflow with multi-platform support, metadata e…
sledro Sep 26, 2025
6f36fd9
Refactor DockerfileOp to optimize package installation and streamline…
sledro Sep 26, 2025
05ef6f6
Add ignore rule for DL3008 in Docker build workflow
sledro Sep 26, 2025
19c3ef9
Refactor Docker build workflow to streamline tag generation and remov…
sledro Sep 26, 2025
eded2dd
Remove timeout setting from Docker build workflow to enhance flexibil…
sledro Sep 29, 2025
80fb078
Update Docker build workflow to use 'Large' runner for metadata extra…
sledro Sep 29, 2025
d58e01b
Optimize Rust compilation settings in DockerfileOp and update GitHub …
sledro Sep 30, 2025
94639ab
Update Docker build workflow to use 'Large' runner for all jobs, enha…
sledro Sep 30, 2025
c86a240
Enhance DockerfileOp for improved Rust compilation by configuring a f…
sledro Sep 30, 2025
c855d07
Update Docker build workflow to always push images for all event type…
sledro Sep 30, 2025
830bd40
Merge branch 'v0.2.6-lightlink' into feat/gasless-2
sledro Oct 28, 2025
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
4 changes: 0 additions & 4 deletions .github/CODEOWNERS

This file was deleted.

15 changes: 0 additions & 15 deletions .github/pull_request_template.md

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/checks_docker.yaml

This file was deleted.

100 changes: 0 additions & 100 deletions .github/workflows/docker_build.yaml

This file was deleted.

202 changes: 202 additions & 0 deletions .github/workflows/docker_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
name: Docker Build Release

on:
push:
branches:
- lightlink
- main
tags:
- "v*"
pull_request:
types: [opened, synchronize]
workflow_dispatch:
inputs:
features:
description: "Rust features to enable"
required: false
default: ""

env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}

jobs:
extract-metadata:
name: Extract metadata
runs-on:
labels: Large
outputs:
version: ${{ steps.meta.outputs.version }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
primary-tag: ${{ steps.primary-tag.outputs.tag }}
should-push: ${{ steps.push-decision.outputs.should-push }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
tags: |
type=ref,event=branch
type=ref,event=pr
type=sha,prefix=sha-,format=short
type=raw,value=latest,enable={{is_default_branch}}
type=semver,pattern={{version}}
type=semver,pattern={{major}}.{{minor}}
type=semver,pattern={{major}}
labels: |
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
org.opencontainers.image.revision=${{ github.sha }}
org.opencontainers.image.created={{date 'iso8601'}}

- name: Get primary tag
id: primary-tag
run: |
# Get the first tag from metadata, with fallback
primary_tag=$(echo '${{ steps.meta.outputs.tags }}' | head -n1)

# If no tags generated, create a fallback based on event type
if [ -z "$primary_tag" ]; then
case "${{ github.event_name }}" in
"pull_request")
primary_tag="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:pr-${{ github.event.number }}"
;;
"push")
branch_name=$(echo "${{ github.ref_name }}" | sed 's/[^a-zA-Z0-9._-]/-/g')
primary_tag="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${branch_name}-${{ github.sha }}"
;;
*)
primary_tag="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.sha }}"
;;
esac
fi

echo "tag=$primary_tag" >> $GITHUB_OUTPUT
echo "Using primary tag: $primary_tag"

- name: Decide whether to push
id: push-decision
run: |
# Always push images for all event types
echo "Event name: ${{ github.event_name }}"
echo "Ref: ${{ github.ref }}"
echo "Event type: ${{ github.ref_type }}"

should_push="true"
echo "Always pushing images - configured to push for all events"

echo "Final decision: should_push=${should_push}"
echo "should-push=${should_push}" >> $GITHUB_OUTPUT

- name: Show generated tags (debug)
run: |
echo "All generated tags:"
echo '${{ steps.meta.outputs.tags }}'
echo ""
echo "Primary tag: ${{ steps.primary-tag.outputs.tag }}"
echo "Should push: ${{ steps.push-decision.outputs.should-push }}"

lint-dockerfile:
name: Lint Dockerfile
runs-on:
labels: Large
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Lint Dockerfile
uses: hadolint/hadolint-action@v3.1.0
with:
dockerfile: DockerfileOp
failure-threshold: warning
ignore: DL3008

build-and-push:
name: Build and push Docker image
needs: [extract-metadata, lint-dockerfile]
runs-on:
labels: Large
permissions:
contents: read
packages: write
env:
SHOULD_PUSH: ${{ needs.extract-metadata.outputs.should-push }}
steps:
- name: Checkout
uses: actions/checkout@v4

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

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

- name: Log in to Container Registry
if: env.SHOULD_PUSH == 'true'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
id: build
uses: docker/build-push-action@v5
with:
context: .
file: DockerfileOp
platforms: linux/amd64,linux/arm64
push: ${{ needs.extract-metadata.outputs.should-push == 'true' }}
tags: ${{ needs.extract-metadata.outputs.tags }}
labels: ${{ needs.extract-metadata.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
RBUILDER_BIN=op-rbuilder
FEATURES=${{ inputs.features || '' }}

- name: Show build results (debug)
run: |
echo "Push decision: ${{ needs.extract-metadata.outputs.should-push }}"
echo "Push boolean: ${{ needs.extract-metadata.outputs.should-push == 'true' }}"
echo "Build digest: ${{ steps.build.outputs.digest }}"
echo "Build metadata: ${{ steps.build.outputs.metadata }}"

security-scan:
name: Security scan
needs: [build-and-push, extract-metadata]
if: needs.extract-metadata.outputs.should-push == 'true'
runs-on:
labels: Large
permissions:
contents: read
security-events: write
steps:
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@master
with:
image-ref: ${{ needs.extract-metadata.outputs.primary-tag }}
format: "sarif"
output: "trivy-results.sarif"

- name: Upload Trivy scan results
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"

test-image:
name: Test Docker image
needs: [build-and-push, extract-metadata]
if: needs.extract-metadata.outputs.should-push == 'true'
runs-on:
labels: Large
steps:
- name: Test image
run: |
docker run --rm ${{ needs.extract-metadata.outputs.primary-tag }} --version
Loading
Loading