publish full node to dockerhub when tagged #45
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: release | |
on: | |
push: | |
tags: | |
- "v*.*.*" | |
jobs: | |
linux_amd64_binary_extraction: | |
runs-on: ubicloud-standard-30 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt update && sudo apt -y install curl gcc cpp cmake clang llvm | |
sudo apt -y autoremove && sudo apt clean && sudo rm -rf /var/lib/apt/lists/* | |
- name: Install Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
rustup install 1.81.0 | |
rustup default 1.81.0 | |
- name: Install risc0 | |
uses: ./.github/actions/install-risc0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Project | |
env: | |
SKIP_GUEST_BUILD: 1 | |
run: | | |
cargo build --release | |
- name: Check BATCH_PROOF_BITCOIN_ID | |
id: check-id | |
uses: ./.github/actions/validate-bitcoin-da | |
with: | |
expected_da_id: ${{ vars.EXPECTED_BITCOIN_DA_ID }} | |
action: check_binary | |
- name: Upload linux-amd64 Binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: citrea-${{ github.ref_name }}-linux-amd64 | |
path: target/release/citrea | |
osx_arm64_binary_extraction: | |
runs-on: self-hosted-citrea-osx-arm64 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Rust | |
run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | |
rustup install 1.81.0 | |
rustup default 1.81.0 | |
- name: Install risc0 | |
uses: ./.github/actions/install-risc0 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Build Project | |
env: | |
SKIP_GUEST_BUILD: 1 | |
run: | | |
source $HOME/.cargo/env | |
cargo build --release | |
- name: Check BATCH_PROOF_BITCOIN_ID | |
id: check-id | |
uses: ./.github/actions/validate-bitcoin-da | |
with: | |
expected_da_id: ${{ vars.EXPECTED_BITCOIN_DA_ID }} | |
action: check_binary | |
- name: Upload osx-arm64 Binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: citrea-${{ github.ref_name }}-osx-arm64 | |
path: target/release/citrea | |
release: | |
needs: [ linux_amd64_binary_extraction, osx_arm64_binary_extraction ] | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download linux-amd64 Binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: citrea-${{ github.ref_name }}-linux-amd64 | |
path: release | |
- name: rename file | |
run: | | |
mv release/citrea release/citrea-${{ github.ref_name }}-linux-amd64 | |
- name: Download OSX ARM64 Binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: citrea-${{ github.ref_name }}-osx-arm64 | |
path: release | |
- name: rename file | |
run: | | |
mv release/citrea release/citrea-${{ github.ref_name }}-osx-arm64 | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
release/citrea-${{ github.ref_name }}-osx-arm64 | |
release/citrea-${{ github.ref_name }}-linux-amd64 | |
name: Release ${{ github.ref_name }} | |
body: | | |
This is the release for version ${{ github.ref_name }}. | |
It includes: | |
- citrea-${{ github.ref_name }}-linux-amd64 | |
- citrea-${{ github.ref_name }}-osx-arm64 | |
update-public-fullnode: | |
runs-on: ubuntu-latest | |
needs: [ release ] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Download linux-amd64 Binary | |
uses: actions/download-artifact@v4 | |
with: | |
name: citrea-${{ github.ref_name }}-linux-amd64 | |
path: . | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Login to Docker Registry | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ vars.DOCKER_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Rename binary and Move required resources | |
run: | | |
mv citrea-${{ github.ref_name }}-linux-amd64 docker/build-push/nightly/citrea | |
chmod +x docker/build-push/nightly/citrea | |
mkdir -p docker/build-push/nightly/genesis/ | |
mv resources/genesis/testnet/ docker/build-push/nightly/genesis/ | |
- name: Build and push Linux image | |
uses: docker/build-push-action@v5 | |
env: | |
DOCKERHUB_REPOSITORY: citrea-fullnode | |
IMAGE_TAG: testnet | |
with: | |
context: . | |
file: docker/build-push/nightly/Dockerfile | |
platforms: linux/amd64 | |
push: true | |
load: false | |
provenance: false | |
tags: | | |
${{ vars.DOCKER_USERNAME }}/${{ env.DOCKERHUB_REPOSITORY }}:${{ env.IMAGE_TAG }} |