-
Notifications
You must be signed in to change notification settings - Fork 37
48 lines (43 loc) · 1.52 KB
/
release-image.yml
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
name: Release image
on:
workflow_dispatch:
inputs:
image:
description: "The OCI image name. This must not include a tag or digest."
type: string
default: "docker.io/laurentsimon/oss-na24-slsa-workshop-project1-echo-server"
digest:
description: "The OCI image digest. The image digest of the form '<algorithm>:<digest>' (e.g. 'sha256:abcdef...')"
type: string
default: "sha256:4004ae316501b67d4d2f7eb82b02f36f32f91101cc9a53d5eb4dd044c16a552e"
environment:
type: choice
description: Environment to use
options:
- prod
- staging
permissions: read-all
defaults:
run:
shell: bash
env:
IMAGE_REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}-echo-server
REGISTRY_USERNAME: laurentsimon
jobs:
release:
permissions:
id-token: write # for creating OIDC tokens for signing.
packages: write # for uploading attestations.
contents: read # To read the repo.
uses: laurentsimon/oss-na24-slsa-workshop-organization/.github/workflows/image-releaser.yml@main
with:
environment: ${{ inputs.environment }}
image: ${{ needs.build.outputs.image }}
digest: ${{ needs.build.outputs.digest }}
# Use name rather than env variable because env are not available for reusable workflows.
registry-username: laurentsimon
#registry-username: ${{ github.actor }}
secrets:
registry-password: ${{ secrets.REGISTRY_PASSWORD }}
#registry-password: ${{ secrets.GITHUB_TOKEN }}