Skip to content

V6.13.0

V6.13.0 #9

Workflow file for this run

name: Development Build
on:
pull_request:
paths-ignore:
- ".vscode/**"
- ".devcontainer/**"
- "assets/**"
- "docs/**"
- ".editorconfig"
- "**.md"
branches:
- main
types:
- opened
- synchronize
jobs:
dev-build:
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Extract Version for Dev Build
id: versioning
run: |
branch_name=${{ github.head_ref }}
if [[ "$branch_name" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
version=${branch_name#v}
echo "version=$version" >> $GITHUB_OUTPUT
echo "tags=ghcr.io/thunderatz/stm32cubemx:${version}-dev" >> $GITHUB_OUTPUT
else
echo "Error: Branch name must follow 'vx.y.z' pattern." >&2
exit 1
fi
shell: bash
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and Push Dev Docker Image
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ${{ steps.versioning.outputs.tags }}
cache-from: type=registry,ref=ghcr.io/thunderatz/stm32cubemx:${{ steps.versioning.outputs.version }}
cache-to: type=inline