Update readme and translations #98
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Push Docker Image | |
on: | |
push: | |
branches: [ main ] | |
tags: [ 'v*' ] | |
pull_request: | |
branches: [ main ] | |
env: | |
REGISTRY: ghcr.io | |
IMAGE_NAME: thirdkeyai/symbi | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
id-token: write # Required for OIDC keyless signing | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Log in to Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: ${{ env.REGISTRY }} | |
username: ${{ github.actor }} | |
password: ${{ secrets.GITHUB_TOKEN }} | |
- name: Extract metadata | |
id: meta | |
uses: docker/metadata-action@v5 | |
with: | |
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} | |
tags: | | |
type=ref,event=branch | |
type=ref,event=pr | |
type=sha | |
type=semver,pattern={{version}} | |
type=semver,pattern={{major}}.{{minor}} | |
type=semver,pattern={{major}} | |
type=raw,value=latest,enable={{is_default_branch}} | |
- name: Build and push Docker image | |
id: build | |
uses: docker/build-push-action@v5 | |
with: | |
context: . | |
push: true | |
tags: ${{ steps.meta.outputs.tags }} | |
labels: ${{ steps.meta.outputs.labels }} | |
- name: Install cosign | |
uses: sigstore/[email protected] | |
with: | |
cosign-release: 'v2.2.3' | |
- name: Sign image with cosign | |
run: | | |
images="${{ steps.meta.outputs.tags }}" | |
for image in ${images//,/ }; do | |
echo "Signing image: $image" | |
cosign sign --yes "$image" | |
done | |
env: | |
COSIGN_EXPERIMENTAL: "1" |