-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bc5fa48
commit d80b9d9
Showing
6 changed files
with
147 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
target/ | ||
.github/ | ||
deploy/ | ||
crd/ | ||
tests/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: Build docker image | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
|
||
jobs: | ||
build-docker-image: | ||
name: Build docker image | ||
uses: restatedev/restate/.github/workflows/docker.yml@main | ||
secrets: inherit |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Create new release | ||
|
||
on: | ||
push: | ||
tags: | ||
- v** | ||
|
||
jobs: | ||
build-docker-image: | ||
name: Build release Docker image | ||
uses: ./.github/workflows/docker.yml | ||
secrets: inherit | ||
|
||
publish-release: | ||
name: Publish release | ||
runs-on: ubuntu-latest | ||
needs: [build-docker-image] | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Create release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
# create a draft release which needs manual approval | ||
draft: true | ||
files: | | ||
crd/crd.yaml | ||
deploy/operator.pkl |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
FROM --platform=$BUILDPLATFORM ghcr.io/restatedev/dev-tools:latest AS planner | ||
COPY . . | ||
RUN just chef-prepare | ||
|
||
FROM --platform=$BUILDPLATFORM ghcr.io/restatedev/dev-tools:latest AS base | ||
COPY --from=planner /restate/recipe.json recipe.json | ||
COPY justfile justfile | ||
|
||
# avoid sharing sccache port between multiplatform builds - they share a network but not a filesystem, so it won't work | ||
FROM base AS base-amd64 | ||
ARG SCCACHE_SERVER_PORT=4226 | ||
|
||
FROM base AS base-arm64 | ||
ARG SCCACHE_SERVER_PORT=4227 | ||
|
||
FROM base-$TARGETARCH AS builder | ||
ARG SCCACHE_SERVER_PORT | ||
ARG TARGETARCH | ||
# https://github.com/mozilla/sccache/blob/main/docs/GHA.md | ||
ARG ACTIONS_CACHE_URL='' | ||
ARG ACTIONS_RUNTIME_TOKEN='' | ||
ARG SCCACHE_GHA_ENABLED='' | ||
# Overrides the behaviour of the release profile re including debug symbols, which in our repo is not to include them. | ||
# Should be set to 'false' or 'true'. See https://doc.rust-lang.org/cargo/reference/environment-variables.html | ||
ARG CARGO_PROFILE_RELEASE_DEBUG=false | ||
RUN just arch=$TARGETARCH libc=musl chef-cook --release --bin restate-operator | ||
COPY . . | ||
RUN just arch=$TARGETARCH libc=musl build --release --bin restate-operator && mv target/$(just arch=$TARGETARCH libc=musl print-target)/release/restate-operator target/restate-operator | ||
|
||
FROM gcr.io/distroless/static:nonroot | ||
COPY --from=builder --chown=nonroot:nonroot /restate/target/restate-operator /app/restate-operator | ||
ENTRYPOINT ["/app/restate-operator"] |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
# Restate Operator | ||
|
||
## Releasing | ||
1. Update the image version in deploy/operator.pkl and the version in Cargo.toml eg to `0.0.2` | ||
2. Push a new tag `v0.0.2` | ||
3. Accept the draft release once the workflow finishes |
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