Skip to content

Deploy image

Deploy image #5

Workflow file for this run

name: Deploy 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"
policy-id:
description: "Policy ID for the service account we want to deploy on."
type: string
default: "servers-staging.json"
environment:
type: choice
description: Environment to use
options:
- staging
- prod
permissions: read-all
defaults:
run:
shell: bash
env:
IMAGE_REGISTRY: docker.io
IMAGE_NAME: ${{ github.repository }}-echo-server
jobs:
deploy:
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-deployer.yml@main
with:
policy-id: ${{ inputs.policy-id }}
image: ${{ inputs.image }}
digest: ${{ inputs.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 }}