Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion .github/workflows/chart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,18 @@ jobs:
echo "owner=${GITHUB_REPOSITORY_OWNER,,}" >> "$GITHUB_OUTPUT"
echo "version=${GITHUB_REF#refs/tags/v}" >> "$GITHUB_OUTPUT"

- name: Log in to Container Registry
# Two credential stores need populating: docker/login-action writes
# ~/.docker/config.json (read by cosign when it pushes the signature),
# while helm push uses Helm's own registry config. Authenticating only
# one leaves the other UNAUTHORIZED.
- name: Log in to Container Registry (cosign)
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Log in to Helm registry
run: |
echo "${{ secrets.GITHUB_TOKEN }}" \
| helm registry login "${REGISTRY}" --username "${{ github.actor }}" --password-stdin
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ jobs:
type=semver,pattern={{major}}

- name: Build and push
id: build
uses: docker/build-push-action@v6
with:
context: .
Expand All @@ -153,14 +154,21 @@ jobs:
build-args: |
VERSION=${{ needs.release.outputs.version }}

- name: Sign container image
- name: Install cosign
uses: sigstore/cosign-installer@v3

- name: Sign the images with cosign
run: |
cosign sign --yes ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ needs.release.outputs.version }}
- name: Lowercase image reference
id: img
# github.repository is mixed-case (AYDEV-FR/dploy); OCI refs must be
# lowercase or cosign rejects them with "could not parse reference".
run: echo "name=${IMAGE_NAME,,}" >> "$GITHUB_OUTPUT"
env:
COSIGN_EXPERIMENTAL: 1
IMAGE_NAME: ${{ env.IMAGE_NAME }}

- name: Sign the image with cosign
# Sign the immutable digest from the build, not the mutable tag.
run: |
cosign sign --yes "${REGISTRY}/${{ steps.img.outputs.name }}@${{ steps.build.outputs.digest }}"

update-docs:
name: Update Documentation
Expand Down
Loading