Skip to content

Revert "Add custom-frontend slot to checkbox-ce-oem (New)" (bugfix) #348

Revert "Add custom-frontend slot to checkbox-ce-oem (New)" (bugfix)

Revert "Add custom-frontend slot to checkbox-ce-oem (New)" (bugfix) #348

name: Validate snap builds when PR is approved
permissions:
contents: read
on:
pull_request_review:
types: [submitted]
# Allow manual trigger
workflow_dispatch:
jobs:
snapcraft_changes_required:
runs-on: ubuntu-latest
name: Check for changes in checkbox-snap and checkbox-core-snap dirs
outputs:
required_run: ${{ steps.check_diff.outputs.required_run }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
fetch-depth: 0
persist-credentials: false
- name: Use git diff to see if there are any changes in the snap directories
id: check_diff
run: |
DIFF_LENGTH=`git diff HEAD origin/main -- checkbox-snap checkbox-core-snap | wc -l`
if [[ $DIFF_LENGTH -eq 0 ]]
then
echo "No snap build validation required."
echo "required_run=false" >> $GITHUB_OUTPUT
else
echo "Snap build validation required!"
echo "required_run=true" >> $GITHUB_OUTPUT
fi
snap-cross-build-validation:
needs: snapcraft_changes_required
if: (github.event.review.state == 'approved' && true == fromJSON(needs.snapcraft_changes_required.outputs.required_run)) || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/checkbox-daily-cross-builds.yaml
secrets:
SNAPCRAFT7_CREDS: ${{ secrets.SNAPCRAFT7_CREDS }}
with:
store_upload: false
snap-native-build-validation:
needs: snapcraft_changes_required
if: (github.event.review.state == 'approved' && true == fromJSON(needs.snapcraft_changes_required.outputs.required_run)) || github.event_name == 'workflow_dispatch'
uses: ./.github/workflows/checkbox-daily-native-builds.yaml
secrets:
SNAPCRAFT7_CREDS: ${{ secrets.SNAPCRAFT7_CREDS }}
with:
store_upload: false