Skip to content

fix(git): private cache dir, LRU eviction, configurable location (#61) #144

fix(git): private cache dir, LRU eviction, configurable location (#61)

fix(git): private cache dir, LRU eviction, configurable location (#61) #144

---
name: Build, Push & Scan Container Image
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-scan:
name: Build, Push to ttl.sh & Scan
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
submodules: true
fetch-depth: 0
- name: Set build metadata
id: meta
run: |
echo "commit=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: Build & push to ttl.sh
uses: dagger/dagger-for-github@v8.4.1
with:
version: "0.20.0"
verb: call
module: github.com/stuttgart-things/blueprints/kubernetes-microservice@v1.71.0
args: >-
bake-image
--src .
--repository-name stuttgart-things/provider-kubeconfig
--tag ${{ steps.meta.outputs.commit }}
--registry-url ttl.sh
--dockerfile cluster/images/provider-kubeconfig/Dockerfile
env:
DAGGER_CLOUD_TOKEN: ${{ secrets.DAGGER_CLOUD_TOKEN }}
- name: Scan image
uses: dagger/dagger-for-github@v8.4.1
with:
version: "0.20.0"
verb: call
module: github.com/stuttgart-things/blueprints/kubernetes-microservice@v1.71.0
args: >-
scan-image
--image-ref ttl.sh/stuttgart-things/provider-kubeconfig:${{ steps.meta.outputs.commit }}
--severity HIGH,CRITICAL
env:
DAGGER_CLOUD_TOKEN: ${{ secrets.DAGGER_CLOUD_TOKEN }}