Skip to content

Commit ceaf9fe

Browse files
committed
update README
Signed-off-by: CrazyMax <[email protected]>
1 parent 46d1973 commit ceaf9fe

File tree

2 files changed

+44
-2
lines changed

2 files changed

+44
-2
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ jobs:
120120
permissions:
121121
contents: read
122122
id-token: write # needed for signing the images with GitHub OIDC Token
123+
packages: write # needed to push images to GitHub Container Registry
123124
steps:
124125
-
125126
name: Docker meta

README.md

Lines changed: 43 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,52 @@
55

66
This repository provides official Docker-maintained [reusable GitHub Actions workflows](https://docs.github.com/en/actions/how-tos/reuse-automations/reuse-workflows)
77
to securely build container images using Docker best practices. The workflows
8-
sign BuildKit-generated SLSA-compliant provenance attestations and help
9-
establish Docker as a trusted authority in secure software supply chains.
8+
sign BuildKit-generated SLSA-compliant provenance attestations and align with
9+
the principles behind [Docker Hardened Images](https://docs.docker.com/dhi/how-to/use/),
10+
enabling open source projects to follow a seamless path toward higher levels of
11+
security and trust.
1012

1113
## :test_tube: Experimental
1214

1315
This repository is considered **EXPERIMENTAL** and under active development
1416
until further notice. It is subject to non-backward compatible changes or
1517
removal in any future version.
18+
19+
## Build reusable workflow
20+
21+
```yaml
22+
name: ci
23+
24+
permissions:
25+
contents: read
26+
27+
on:
28+
push:
29+
branches:
30+
- 'main'
31+
tags:
32+
- 'v*'
33+
pull_request:
34+
35+
build:
36+
uses: docker/github-builder-experimental/.github/workflows/build.yml@main
37+
permissions:
38+
contents: read
39+
id-token: write # for signing attestation manifests with GitHub OIDC Token
40+
packages: write # needed to push images to GitHub Container Registry
41+
with:
42+
meta-images: name/app
43+
meta-tags: |
44+
type=ref,event=branch
45+
type=ref,event=pr
46+
type=semver,pattern={{version}}
47+
build-output: ${{ github.event_name != 'pull_request' && 'registry' || 'cacheonly' }}
48+
build-platforms: linux/amd64,linux/arm64
49+
secrets:
50+
registry-auths: |
51+
- registry: docker.io
52+
username: ${{ vars.DOCKERHUB_USERNAME }}
53+
password: ${{ secrets.DOCKERHUB_TOKEN }}
54+
```
55+
56+
You can find the list of available inputs in [`.github/workflows/build.yml`](.github/workflows/build.yml).

0 commit comments

Comments
 (0)