-
Notifications
You must be signed in to change notification settings - Fork 2
61 lines (52 loc) · 1.89 KB
/
Copy pathdepot.yml
File metadata and controls
61 lines (52 loc) · 1.89 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
on:
push:
branches:
- main
name: depot
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write
steps:
- name: harden runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
disable-sudo: true
egress-policy: block
allowed-endpoints: >
api.depot.dev:443
auth.docker.io:443
dl.depot.dev:443
ghcr.io:443
github.com:443
index.crates.io:443
index.docker.io:443
objects.githubusercontent.com:443
pkg-containers.githubusercontent.com:443
registry-1.docker.io:443
static.crates.io:443
static.rust-lang.org:443
- name: checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
# Toolchain version comes from rust-toolchain.toml; protoc is vendored.
- name: install rust
uses: dtolnay/rust-toolchain@29eef336d9b2848a0b548edc03f92a220660cdb8 # stable
- name: install cross
uses: taiki-e/install-action@e49978b799e49ff429d162b7a30601a569ab6538 # main
with:
tool: cross
- name: cross build static binary
run: cross build --release --bin kickable --all-features --locked --target x86_64-unknown-linux-musl
- name: setup depot
uses: depot/setup-action@eb2efd6287c794d456be5e1a7963fa8772c39ce5 # v1.5.0
# Validate that the cross-built binary packages into the scratch app image.
# No --load/-t: depot's ephemeral registry ref uses the project ID, which
# contains uppercase characters that Docker rejects as a repository name.
- name: build
run: depot build --platform linux/amd64 -f docker/Dockerfile .
env:
DEPOT_TOKEN: ${{ secrets.DEPOT_TOKEN }}