This file contains 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: New Docker images builds and pushing for API and executors | |
on: | |
push: | |
tags: | |
- "v[0-9]+.[0-9]+.[0-9]+-" | |
branches: | |
- ci/add-builds-to-depot | |
env: | |
ALPINE_IMAGE: alpine:3.20.3 | |
BUSYBOX_IMAGE: busybox:1.36.1-musl | |
permissions: | |
id-token: write # needed for keyless signing with cosign and for depot | |
jobs: | |
api: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Depot CLI | |
uses: depot/setup-action@v1 | |
# - uses: sigstore/[email protected] #TODO: add cosign action | |
- name: Login to DockerHub | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Create Docker tags and metadata for the API | |
id: api-meta | |
uses: docker/metadata-action@v5 | |
with: | |
bake-target: 'api-meta' | |
images: | | |
kubeshop/testkube-api-server | |
kubeshop/testkube-sandbox | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=raw,value=api-server-{{branch}}-{{sha}} | |
- name: Create Docker tags and metadata for tw-init | |
id: tw-init | |
uses: docker/metadata-action@v5 | |
with: | |
bake-target: 'tw-init' | |
images: | | |
kubeshop/testkube-tw-init | |
kubeshop/testkube-sandbox | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=raw,value=testworkflow-init-{{branch}}-{{sha}} | |
- name: Create Docker tags and metadata for tw-toolkit | |
id: tw-toolkit | |
uses: docker/metadata-action@v5 | |
with: | |
bake-target: 'tw-toolkit' | |
images: | | |
kubeshop/testkube-tw-toolkit | |
kubeshop/testkube-sandbox | |
tags: | | |
type=ref,event=branch | |
type=semver,pattern={{version}} | |
type=raw,value=testworkflow-toolkit-{{branch}}-{{sha}} | |
- name: Build | |
uses: depot/bake-action@v1 | |
with: | |
files: | | |
./docker-bake.hcl | |
${{ steps.api-meta.outputs.bake-file }} | |
${{ steps.tw-toolkit.outputs.bake-file }} | |
${{ steps.tw-init.outputs.bake-file }} | |
targets: api,tw-toolkit,tw-init | |
provenance: mode=max | |
push: true | |
sbom: true | |
env: | |
VERSION: ${{ fromJSON(steps.api-meta.outputs.json).labels['org.opencontainers.image.version'] }} | |
GIT_SHA: ${{ fromJSON(steps.api-meta.outputs.json).labels['org.opencontainers.image.revision'] }} | |
SLACK_BOT_CLIENT_ID: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_ID}} | |
SLACK_BOT_CLIENT_SECRET: ${{secrets.TESTKUBE_SLACK_BOT_CLIENT_SECRET}} | |
ANALYTICS_TRACKING_ID: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_ID}} | |
ANALYTICS_API_KEY: ${{secrets.TESTKUBE_API_GA_MEASUREMENT_SECRET}} | |
SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_SEGMENTIO_KEY}} | |
CLOUD_SEGMENTIO_KEY: ${{secrets.TESTKUBE_API_CLOUD_SEGMENTIO_KEY}} | |