Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
/gradle
/.jj
/.git
/target
/benchmark
/crates/rust-sample-wallet/dist
/crates/rust-sample-wallet/node_modules
/canary/Dockerfile
.dockerignore
.gitignore
81 changes: 81 additions & 0 deletions .github/workflows/deploy-sign-sample.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Deploy Sign Sample to Github Pages

on:
push:
branches:
- main
- push-tlltnpmvwzwm
workflow_dispatch:

permissions:
contents: write # for committing to gh-pages branch.
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
Github-Pages-Release:

timeout-minutes: 10

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4 # repo checkout

# Install Rust Nightly Toolchain, with Clippy & Rustfmt
- name: Install nightly Rust
uses: dtolnay/rust-toolchain@nightly
with:
components: clippy, rustfmt

- name: Add WASM target
run: rustup target add wasm32-unknown-unknown

- name: Download and install Trunk binary
run: wget -qO- https://github.com/trunk-rs/trunk/releases/download/v0.18.4/trunk-x86_64-unknown-linux-gnu.tar.gz | tar -xzf-

- name: Build with Trunk
# "${GITHUB_REPOSITORY#*/}" evaluates into the name of the repository
# using --public-url something will allow trunk to modify all the href paths like from favicon.ico to repo_name/favicon.ico .
# this is necessary for github pages where the site is deployed to username.github.io/repo_name and all files must be requested
# relatively as favicon.ico. if we skip public-url option, the href paths will instead request username.github.io/favicon.ico which
# will obviously return error 404 not found.
run: ../../trunk build --release --public-url "${GITHUB_REPOSITORY#*/}"
working-directory: crates/rust-sample-wallet
env:
REOWN_PROJECT_ID: ${{ vars.REOWN_PROJECT_ID }}


# Deploy to gh-pages branch
# - name: Deploy 🚀
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# folder: dist


# Deploy with Github Static Pages

- name: Setup Pages
uses: actions/configure-pages@v4
with:
enablement: true

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload dist dir
path: './crates/rust-sample-wallet/dist'

- name: Deploy to GitHub Pages 🚀
id: deployment
uses: actions/deploy-pages@v4
64 changes: 64 additions & 0 deletions .github/workflows/publish_sign_canary.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: publish_sign_canary
on:
workflow_dispatch:
push:
branches:
- main
- push-yruotstkupns
- push-tlltnpmvwzwm

concurrency: ${{ github.workflow }}

env:
TERM: linux

jobs:
push:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ECR_PUBLISHER_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_ECR_PUBLISHER_SECRET_ACCESS_KEY }}
aws-region: eu-central-1

- name: Login to Amazon ECR
id: login-ecr
uses: aws-actions/amazon-ecr-login@v2
with:
mask-password: 'true'

- name: Checkout
uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Cache Docker layers
uses: actions/cache@v4
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-

- name: Build, tag, and push image to Amazon ECR
uses: docker/build-push-action@v6
with:
context: .
file: canary/Dockerfile
push: true
tags: ${{ steps.login-ecr.outputs.registry }}/rust-sign-client:${{ github.sha }},${{ steps.login-ecr.outputs.registry }}/rust-sign-client:main
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache-new

# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache
Loading