Skip to content

Secure boot state checking for Classic and Core no matter if the enable or disable (New) #857

Secure boot state checking for Classic and Core no matter if the enable or disable (New)

Secure boot state checking for Classic and Core no matter if the enable or disable (New) #857

name: checkbox-dss Snap build
permissions:
contents: read
on:
push:
branches: [ main ]
paths:
- contrib/checkbox-dss-validation/checkbox-provider-dss/**
- .github/workflows/checkbox-dss-build.yaml
pull_request_review:
branches: [ main ]
types: [submitted]
workflow_dispatch:
workflow_call:
outputs:
artifact-url:
value: ${{ jobs.snap_frontend_native.outputs.artifact-url }}
jobs:
dss_snap_build_required:
runs-on: ubuntu-latest
name: Check for changes in checkbox-dss dirs
outputs:
build_required: ${{ steps.check_diff.outputs.build_required }}
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
fetch-depth: 0
persist-credentials: false
- name: Use git diff to see if there are any changes in the checkbox-dss directories
id: check_diff
run: |
DIFF_LENGTH=`git diff HEAD origin/main -- contrib/checkbox-dss-validation .github/workflows/checkbox-dss-build.yaml | wc -l`
if [[ $DIFF_LENGTH -eq 0 ]]
then
echo "No checkbox-dss snap build required."
echo "build_required=false" >> $GITHUB_OUTPUT
else
echo "checkbox-dss snap build required!"
echo "build_required=true" >> $GITHUB_OUTPUT
fi
snap_frontend_native:
needs: dss_snap_build_required
# When running for a PR, run only after approval
if: github.event_name != 'pull_request_review' || (github.event.review.state == 'approved' && true == fromJSON(needs.dss_snap_build_required.outputs.build_required))
outputs:
artifact-url: ${{ steps.upload_artifact.outputs.artifact-url }}
runs-on:
group: "Canonical self-hosted runners"
labels: ["self-hosted", "linux", "jammy", "large", "X64"]
timeout-minutes: 1200 #20h, this will timeout sooner due to inner timeouts
name: Checkbox DSS validation snap
steps:
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
with:
fetch-depth: 0
persist-credentials: false
- id: snap_build
uses: Wandalen/wretry.action@71a909ebf09f3ffdc6f42a17bd54ecb43481da49
name: Building the snaps
timeout-minutes: 600 # 10hours
with:
action: snapcore/action-build@v1.3.0
attempt_delay: 600000 # 10min
attempt_limit: 5
with: |
path: contrib/checkbox-dss-validation/
snapcraft-channel: 8.x/stable
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
name: Upload logs on failure
if: failure()
with:
name: snapcraft-log-checkbox-dss-snap
path: |
/home/runner/.cache/snapcraft/log/
/home/runner/.local/state/snapcraft/log/
contrib/checkbox-dss-validation/checkbox*.txt
- id: upload_artifact
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
name: Upload the snaps as artifact
with:
name: checkbox-dss.snap
path: ${{ steps.snap_build.outputs.snap }}
# NOTE:@motjuste: We currently don't publish the checkbox-dss Snap