Skip to content

change: add safe.directory for git clone #21

change: add safe.directory for git clone

change: add safe.directory for git clone #21

Workflow file for this run

name: Build DEB Package
on:
push:
branches:
- feat/tag-build
pull_request:
branches:
- feat/tag-build
jobs:
build-deb:
runs-on: ubuntu-latest
env:
DEB_BUILD_OPTIONS: nocheck # or whatever options you need
strategy:
matrix:
distro: [debian-bookworm, debian-bullseye, ubuntu-24.04, ubuntu-22.04]
include:
- distro: debian-bookworm
image: debian:bookworm
- distro: debian-bullseye
image: debian:bullseye
- distro: ubuntu-24.04
image: ubuntu:24.04
- distro: ubuntu-22.04
image: ubuntu:22.04
container:
image: ${{ matrix.image }}
steps:
- name: Install build dependencies
run: |
apt-get update
apt-get install -y build-essential devscripts debhelper autotools-dev fakeroot sed git
- name: Checkout source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Mark working directory as safe
run: git config --global --add safe.directory $GITHUB_WORKSPACE

Check failure on line 43 in .github/workflows/build_deb.yaml

View workflow run for this annotation

GitHub Actions / .github/workflows/build_deb.yaml

Invalid workflow file

You have an error in your yaml syntax on line 43
- name: Fetch all branches
run: git fetch --tags
- name: update branch name
run: |
safe_branch=$(echo "${GITHUB_REF_NAME}" | tr '/' '-')
sed "s|BRANCH_VERSION|$safe_branch|" configure.ac.in > configure.ac
env:
GITHUB_REF_NAME: ${{ github.ref_name }}
- name: update debian changelog
run: bash ./git2debchangelog.sh > debian/changelog
- name: Prepare autotools
run: |
# Nur falls nicht schon vorhanden (optional)
autoreconf -fi
- name: Build .deb package
run: |
# baue mit dpkg-buildpackage (ohne signieren)
dpkg-buildpackage -us -uc -d
- name: Collect .deb artifact
run: |
mkdir -p artifacts
mv ../*.deb artifacts/
- name: Set sanitized image name
id: sanitize
run: echo "sanitized_image=$(echo "$IMAGE" | tr '/:' '--')" >> $GITHUB_OUTPUT
env:
IMAGE: ${{ matrix.image }}
- name: Upload .deb package
uses: actions/upload-artifact@v4
with:
name: libosal-deb-${{ steps.sanitize.outputs.sanitized_image }}
path: artifacts/*.deb
- name: Install Cloudsmith CLI
run: pip install --upgrade cloudsmith-cli
- name: Upload .deb to Cloudsmith
run: cloudsmith push deb --republish robert-burger-AdLL/libosal/ubuntu/noble artifacts/libosal_0.0.6_amd64.deb --api-key ${{ secrets.CLOUDSMITH_API_KEY }}