Skip to content

update app version in chart config #11

update app version in chart config

update app version in chart config #11

name: Build and Push Image to GHCR
on:
push:
tags:
- v*.*.*
env:
IMAGE_NAME: keycloak-ssi-deployment
REGISTRY: ghcr.io
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
id: builder
uses: docker/setup-buildx-action@v1
with:
install: true
driver: docker-container
driver-opts: image=moby/buildkit:latest
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}-${{ github.ref_name }}
restore-keys: |
${{ runner.os }}-buildx-${{ github.ref_name }}
- name: Login to GitHub Container Registry
uses: docker/#-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Metadata
uses: docker/metadata-action@v5
id: meta
with:
images: ${{ env.REGISTRY }}/${{ github.repository }}
tags: |
type=semver,pattern={{version}}
- name: Build Docker image and push to GHCR
id: push
uses: docker/build-push-action@v6
with:
context: .
file: ./Dockerfile
builder: ${{ steps.builder.outputs.name }}
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
cache-from: type=local,src=/tmp/.buildx-cache
cache-to: type=local,dest=/tmp/.buildx-cache