fix(release): v0.5.4 — fix Docker build and publish pipeline
- Dockerfile: add dummy src/bin/generate-openapi.rs in cacher stage to satisfy Cargo.toml [[bin]] target resolution during dependency caching - docker-publish.yml: add explicit ref to checkout steps so workflow_dispatch builds the correct tag instead of HEAD of main - docker-publish.yml: increase timeout to 180min for multi-arch QEMU builds - Bump version to 0.5.4 Closes #250
This commit is contained in:
@@ -7,7 +7,7 @@ on:
|
|||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
version:
|
version:
|
||||||
description: 'Version tag to publish (e.g. v0.3.0)'
|
description: 'Version tag to publish (e.g. v0.5.3)'
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
@@ -35,7 +35,11 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
DATABASE_URL: "postgres://postgres:postgres@localhost/oxicloud_test"
|
DATABASE_URL: "postgres://postgres:postgres@localhost/oxicloud_test"
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v6
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
# For workflow_dispatch, checkout the exact tag so we build the right code
|
||||||
|
ref: ${{ github.event.inputs.version || github.ref }}
|
||||||
- uses: dtolnay/rust-toolchain@stable
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
- uses: Swatinem/rust-cache@v2
|
- uses: Swatinem/rust-cache@v2
|
||||||
|
|
||||||
@@ -46,15 +50,18 @@ jobs:
|
|||||||
|
|
||||||
- run: cargo test --workspace
|
- run: cargo test --workspace
|
||||||
|
|
||||||
# Build and push multi-arch image in a single job
|
# Build and push multi-arch image
|
||||||
build-and-push:
|
build-and-push:
|
||||||
name: Build & Push Multi-Arch
|
name: Build & Push Multi-Arch
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
timeout-minutes: 120
|
timeout-minutes: 180
|
||||||
needs: test
|
needs: test
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
with:
|
||||||
|
# For workflow_dispatch, checkout the exact tag so we build the right code
|
||||||
|
ref: ${{ github.event.inputs.version || github.ref }}
|
||||||
|
|
||||||
- name: Set version tag
|
- name: Set version tag
|
||||||
id: version
|
id: version
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "oxicloud"
|
name = "oxicloud"
|
||||||
version = "0.5.3"
|
version = "0.5.4"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
default-run = "oxicloud"
|
default-run = "oxicloud"
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -8,8 +8,9 @@ COPY Cargo.toml Cargo.lock ./
|
|||||||
COPY build.rs ./
|
COPY build.rs ./
|
||||||
COPY static static
|
COPY static static
|
||||||
# Create a minimal project to download and cache dependencies
|
# Create a minimal project to download and cache dependencies
|
||||||
RUN mkdir -p src && \
|
RUN mkdir -p src/bin && \
|
||||||
echo 'fn main() { println!("Dummy build for caching dependencies"); }' > src/main.rs && \
|
echo 'fn main() { println!("Dummy build for caching dependencies"); }' > src/main.rs && \
|
||||||
|
echo 'fn main() {}' > src/bin/generate-openapi.rs && \
|
||||||
cargo build --release && \
|
cargo build --release && \
|
||||||
rm -rf src static-dist target/release/deps/oxicloud* target/release/build/oxicloud-*
|
rm -rf src static-dist target/release/deps/oxicloud* target/release/build/oxicloud-*
|
||||||
# Stage 2: Build the application
|
# Stage 2: Build the application
|
||||||
|
|||||||
Reference in New Issue
Block a user