Skip to content

Commit

Permalink
CI: Publish to Docker Hub via workflow dispatch (#1758)
Browse files Browse the repository at this point in the history
  • Loading branch information
jfldde authored Jan 28, 2025
1 parent 3e11690 commit 2147611
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: nightly-build-and-push
name: Build and Push Docker Image

on:
workflow_dispatch:
inputs:
testing:
description: "Build with testing features"
type: boolean
default: false
required: false
push:
branches:
- nightly
Expand Down Expand Up @@ -34,8 +40,15 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}

- name: Build Project
id: build
run: |
cargo build --features testing
if ${{ github.event_name == 'workflow_dispatch' && inputs.testing == 'true' }} || ${{ github.ref == 'refs/heads/nightly' }}; then
cargo build --features testing
echo "image_name=citrea-test" >> $GITHUB_OUTPUT
else
cargo build
echo "image_name=citrea-dev" >> $GITHUB_OUTPUT
fi
- name: Copy binary to build-push/nightly
run: |
Expand All @@ -59,7 +72,7 @@ jobs:
with:
file: ./docker/build-push/nightly/Dockerfile
context: ./docker/build-push/nightly
tags: ${{ vars.DOCKERHUB_USERNAME }}/citrea-test:${{ env.IMAGE_TAG }}
tags: ${{ vars.DOCKERHUB_USERNAME }}/${{ steps.build.outputs.image_name }}:${{ env.IMAGE_TAG }}
platforms: linux/amd64
push: true
load: false
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Build citrea
run: make build-release
env:
CITREA_NETWORK: nightly

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down

0 comments on commit 2147611

Please sign in to comment.