mirror of
https://github.com/paralus/paralus.git
synced 2026-05-06 00:17:19 +00:00
Bumps [docker/login-action](https://github.com/docker/login-action) from 3.1.0 to 3.2.0.
- [Release notes](https://github.com/docker/login-action/releases)
- [Commits](e92390c5fb...0d4c9c5ea7)
---
updated-dependencies:
- dependency-name: docker/login-action
dependency-type: direct:production
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
122 lines
4.0 KiB
YAML
122 lines
4.0 KiB
YAML
name: Create, publish, sign and verify container image
|
|
|
|
on:
|
|
push:
|
|
tags: [ 'v*.*.*' ]
|
|
|
|
env:
|
|
REGISTRY: docker.io
|
|
IMAGE_NAME: paralusio/paralus
|
|
|
|
jobs:
|
|
|
|
build-push-sign-verify:
|
|
strategy:
|
|
matrix:
|
|
os: [ubuntu-latest]
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up QEMU
|
|
uses: docker/setup-qemu-action@v3
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: 'go.mod'
|
|
|
|
- name: Create k8s Kind Cluster
|
|
uses: helm/kind-action@v1.2.0
|
|
|
|
# Sanity check before publishing
|
|
- name: Test all
|
|
run: go test -v ./...
|
|
|
|
- name: Log in to the Container registry
|
|
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
password: ${{ secrets.REGISTRY_PASSWORD }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
|
|
- name: Build and push Docker image
|
|
id: build
|
|
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
|
|
with:
|
|
context: .
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker (paralus-init)
|
|
id: meta-init
|
|
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-init
|
|
|
|
- name: Build and push Docker image (paralus-init)
|
|
id: build-init
|
|
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile.initialize
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ${{ steps.meta-init.outputs.tags }}
|
|
labels: ${{ steps.meta-init.outputs.labels }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker (kratos-sync)
|
|
id: meta-sync
|
|
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81
|
|
with:
|
|
images: ${{ env.REGISTRY }}/paralusio/kratos-synchronizer
|
|
|
|
- name: Build and push Docker image (kratos-sync)
|
|
id: build-sync
|
|
uses: docker/build-push-action@2cdde995de11925a030ce8070c3d77a52ffcf1c0
|
|
with:
|
|
context: .
|
|
file: ./Dockerfile.synchronizer
|
|
platforms: linux/amd64,linux/arm64
|
|
push: true
|
|
tags: ${{ steps.meta-sync.outputs.tags }}
|
|
labels: ${{ steps.meta-sync.outputs.labels }}
|
|
|
|
- name: Install Cosign
|
|
uses: sigstore/cosign-installer@v3.5.0
|
|
|
|
- name: Check Cosign
|
|
run: cosign version
|
|
|
|
- name: Sign Published Docker image using Cosign
|
|
run: |
|
|
cosign sign -y --key env://COSIGN_PRIVATE_KEY \
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}@${{ steps.build.outputs.digest }} \
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-init@${{ steps.build-init.outputs.digest }} \
|
|
${{ env.REGISTRY }}/paralusio/kratos-synchronizer@${{ steps.build-sync.outputs.digest }}
|
|
env:
|
|
COSIGN_PRIVATE_KEY: ${{ secrets.COSIGN_PRIVATE_KEY }}
|
|
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
|
|
|
|
- name: Verify Cosign Signature
|
|
run: |
|
|
cosign verify --key env://COSIGN_PUBLIC_KEY \
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref_name }} \
|
|
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-init:${{ github.ref_name }} \
|
|
${{ env.REGISTRY }}/paralusio/kratos-synchronizer:${{ github.ref_name }}
|
|
env:
|
|
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
|