Skip to content

github: make use of LXD's actions/lp-snap-build in build job (5.0-candidate) #817

github: make use of LXD's actions/lp-snap-build in build job (5.0-candidate)

github: make use of LXD's actions/lp-snap-build in build job (5.0-candidate) #817

Workflow file for this run

name: Commits
on:
- pull_request
permissions:
contents: read
jobs:
commits:
name: Branch target
runs-on: ubuntu-24.04
steps:
- name: Check branch target
env:
TARGET: ${{ github.event.pull_request.base.ref }}
TITLE: ${{ github.event.pull_request.title }}
if: ${{ github.actor != 'dependabot[bot]' }}
run: |
set -x
TARGET_FROM_PR_TITLE="$(echo "${TITLE}" | sed -n 's/.*(\(\(latest\|[0-9]\.[0-9]\)-\(edge\|candidate\)\))$/\1/p')"
if [ -z "${TARGET_FROM_PR_TITLE}" ]; then
TARGET_FROM_PR_TITLE="latest-edge"
else
echo "Branch target overridden from PR title"
fi
[ "${TARGET}" = "${TARGET_FROM_PR_TITLE}" ] && exit 0
echo "Invalid branch target: ${TARGET} != ${TARGET_FROM_PR_TITLE}"
exit 1