Skip to content

Release: v1.1.0

Release: v1.1.0 #14

Workflow file for this run

name: Pipeline
on:
pull_request:
push:
tags:
- "v*"
workflow_dispatch:
env:
DOCKER_BUILDKIT: 1
PROJECT_DOCKER_CACHE_BACKEND: ${{ vars.PROJECT_DOCKER_CACHE_BACKEND }}
PROJECT_DOCKER_HOST: ${{ vars.PROJECT_DOCKER_HOST }}
PROJECT_DOCKER_ORG: ${{ vars.PROJECT_DOCKER_ORG }}
PROJECT_DOCKER_PLATFORMS: ${{ vars.PROJECT_DOCKER_PLATFORMS }}
PROJECT_NAME: ${{ vars.PROJECT_NAME }}
jobs:
lint:
name: Lint
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
uses: schubergphilis/prepare-action@v1
with:
type: container
job: lint
- name: Lint
run: |
make lint
scan:
name: Scan
runs-on: ubuntu-22.04
needs: lint
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
uses: schubergphilis/prepare-action@v1
with:
type: container
job: scan
- name: Scan
run: |
make scan
pre-ci:
name: Pre-CI
runs-on: ubuntu-22.04
needs: scan
outputs:
platforms: ${{ steps.platforms.outputs.value }}
steps:
- name: Get Platforms as JSON
id: platforms
run: |
echo "value=[\"$(echo $PROJECT_DOCKER_PLATFORMS | sed 's/,/\",\"/g')\"]" >> $GITHUB_OUTPUT
ci:
name: CI
runs-on: ubuntu-22.04
needs: pre-ci
strategy:
matrix:
platforms: ${{ fromJSON(needs.pre-ci.outputs.platforms) }}
permissions:
attestations: write
contents: read
id-token: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
uses: schubergphilis/prepare-action@v1
with:
type: container
job: ci
- name: Login to GitHub Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.PROJECT_DOCKER_HOST }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build
env:
PROJECT_DOCKER_PLATFORMS: ${{ matrix.platforms }}
run: |
make build
- name: Test
env:
PROJECT_DOCKER_PLATFORMS: ${{ matrix.platforms }}
run: |
make test
cd:
name: CD
runs-on: ubuntu-22.04
needs: ci
if: ${{ startsWith(github.ref, 'refs/tags/v') }}
permissions:
attestations: write
contents: read
id-token: write
packages: write
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare
uses: schubergphilis/prepare-action@v1
with:
type: container
job: cd
- name: Login to GitHub Registry
uses: docker/login-action@v3
with:
registry: ${{ vars.PROJECT_DOCKER_HOST }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Release
run: |
make release