diff --git a/.github/workflows/cost-estimator-manual.yml b/.github/workflows/cost-estimator-manual.yml index ab7d0023..2df1a715 100644 --- a/.github/workflows/cost-estimator-manual.yml +++ b/.github/workflows/cost-estimator-manual.yml @@ -19,7 +19,7 @@ jobs: - uses: actions/checkout@v4 - name: Setup CI - uses: ./.github/actions/setup + uses: ./.github/actions/setup - name: Run cost estimator run: | diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml new file mode 100644 index 00000000..5d9cc115 --- /dev/null +++ b/.github/workflows/docker-build.yaml @@ -0,0 +1,96 @@ +name: Docker Build + +on: + workflow_dispatch: + push: + branches: + - main + tags: + - 'v*' + pull_request: + branches: + - main + +jobs: + build: + name: Build Docker Images + runs-on: + - runs-on + - cpu=16 + - ram=64 + - family=m7a+m7i-flex + - image=ubuntu22-full-x64 + - run-id=${{ github.run_id }} + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + + - name: Docker meta for op-proposer + id: meta-op-proposer + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}/op-proposer + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha + + - name: Docker meta for succinct-proposer + id: meta-succinct + uses: docker/metadata-action@v5 + with: + images: ghcr.io/${{ github.repository }}/succinct-proposer + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} + type=semver,pattern={{major}}.{{minor}} + type=sha + + - name: Login to GitHub Container Registry + if: github.event_name != 'pull_request' + uses: docker/login-action@v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Pre-build debug + run: | + echo "Meta tags: ${{ steps.meta-op-proposer.outputs.tags }}" + echo "Push condition: ${{ github.event_name != 'pull_request' }}" + echo "Event name: ${{ github.event_name }}" + + - name: Build and push op-proposer + uses: docker/build-push-action@v6 + with: + context: . + file: proposer/op/Dockerfile.op_proposer + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta-op-proposer.outputs.tags }} + labels: ${{ steps.meta-op-proposer.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max + + - name: Post-build debug + run: | + docker images + echo "Checking authentication:" + docker login ghcr.io -u ${{ github.actor }} -p ${{ secrets.GITHUB_TOKEN }} 2>&1 || true + + - name: Build and push succinct-proposer + uses: docker/build-push-action@v6 + with: + context: . + file: proposer/succinct/Dockerfile + push: ${{ github.event_name != 'pull_request' }} + tags: ${{ steps.meta-succinct.outputs.tags }} + labels: ${{ steps.meta-succinct.outputs.labels }} + cache-from: type=gha + cache-to: type=gha,mode=max \ No newline at end of file diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker-test.yaml similarity index 100% rename from .github/workflows/docker.yaml rename to .github/workflows/docker-test.yaml diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index 17d7b8d9..9b714ea9 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v4 - name: Setup CI - uses: ./.github/actions/setup + uses: ./.github/actions/setup - name: OP Sepolia cost estimator on recent block range run: |