Skip to content

Commit 9648bb5

Browse files
committed
update build.
1 parent 31d9876 commit 9648bb5

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/docker-build.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build Docker Images
2+
3+
on:
4+
push:
5+
branches: [ main, movement, ci/* ]
6+
workflow_dispatch:
7+
inputs:
8+
GIT_SHA:
9+
description: 'Git SHA to build'
10+
required: false
11+
FEATURES:
12+
description: 'Cargo features to enable'
13+
required: false
14+
PROFILE:
15+
description: 'Cargo build profile'
16+
required: false
17+
default: 'release'
18+
19+
# Add permissions block to ensure the workflow has access to packages
20+
permissions:
21+
contents: read
22+
packages: write
23+
24+
jobs:
25+
build:
26+
runs-on: buildjet-16vcpu-ubuntu-2204
27+
steps:
28+
- uses: actions/checkout@v3
29+
with:
30+
fetch-depth: 0 # Fetch all history
31+
ref: ${{ github.ref }} # Use the full ref to ensure we're on the right branch
32+
token: ${{ secrets.GH_PAT }} # Use PAT for checkout
33+
34+
- name: Set up Docker Buildx
35+
uses: docker/setup-buildx-action@v2
36+
37+
- name: Login to GitHub Container Registry
38+
uses: docker/login-action@v2
39+
with:
40+
registry: ghcr.io
41+
username: ${{ secrets.GH_USER }} # Use the PAT owner's username
42+
password: ${{ secrets.GH_PAT }} # Use PAT instead of GITHUB_TOKEN
43+
44+
- name: Build and Push Images
45+
run: |
46+
export TARGET_CACHE_ID=${GITHUB_REF#refs/heads/}
47+
export GHCR_ORG="movementlabsxyz"
48+
export PROFILE=${PROFILE:-release}
49+
export FEATURES=${FEATURES:-""}
50+
export CARGO_TARGET_DIR="target/${FEATURES:-default}"
51+
52+
docker/builder/docker-bake-rust-all.sh

0 commit comments

Comments
 (0)