11# SPDX-License-Identifier: MPL-2.0
22name : Container Build
3-
43on :
54 push :
65 branches : [main, develop]
76 pull_request :
87 branches : [main]
98 workflow_dispatch :
10-
119permissions :
1210 contents : read
13-
1411jobs :
1512 container-build :
1613 runs-on : ubuntu-latest
1714 timeout-minutes : 15
1815 permissions :
1916 contents : read
2017 packages : write
21-
2218 steps :
2319 - name : Checkout
2420 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
25-
2621 - name : Set up Podman
2722 run : |
2823 sudo apt-get update
2924 sudo apt-get install -y podman
30-
3125 - name : Build container
3226 run : |
3327 podman build -f .containerization/Containerfile -t fireflag:${{ github.sha }} .
34-
3528 - name : Extract artifacts
3629 run : |
3730 CONTAINER_ID=$(podman create fireflag:${{ github.sha }})
3831 mkdir -p build-output
3932 podman cp $CONTAINER_ID:/build/extension/web-ext-artifacts/ build-output/ || true
4033 podman rm $CONTAINER_ID
41-
4234 - name : Verify checksums
4335 run : |
4436 if [ -f build-output/web-ext-artifacts/SHA256SUMS ]; then
4537 cd build-output/web-ext-artifacts
4638 sha256sum -c SHA256SUMS
4739 fi
48-
4940 - name : Upload extension artifact
5041 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4
5142 with :
5243 name : fireflag-extension-${{ github.sha }}
5344 path : build-output/web-ext-artifacts/*.xpi
5445 retention-days : 30
55-
5646 - name : Upload checksums
5747 uses : actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v4
5848 with :
5949 name : fireflag-checksums-${{ github.sha }}
6050 path : build-output/web-ext-artifacts/SHA256SUMS*
6151 retention-days : 30
62-
6352 reproducibility-check :
6453 runs-on : ubuntu-latest
6554 timeout-minutes : 15
6655 needs : container-build
6756 if : github.event_name == 'pull_request'
68-
6957 steps :
7058 - name : Checkout
7159 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
72-
7360 - name : Set up Podman
7461 run : |
7562 sudo apt-get update
7663 sudo apt-get install -y podman
77-
7864 - name : Build container (attempt 1)
7965 run : |
8066 podman build -f .containerization/Containerfile -t fireflag:build1 .
8167 CONTAINER_ID=$(podman create fireflag:build1)
8268 mkdir -p build1
8369 podman cp $CONTAINER_ID:/build/extension/web-ext-artifacts/ build1/ || true
8470 podman rm $CONTAINER_ID
85-
8671 - name : Build container (attempt 2)
8772 run : |
8873 # Clean and rebuild to test reproducibility
9277 mkdir -p build2
9378 podman cp $CONTAINER_ID:/build/extension/web-ext-artifacts/ build2/ || true
9479 podman rm $CONTAINER_ID
95-
9680 - name : Compare builds
9781 run : |
9882 echo "Comparing build artifacts for reproducibility..."
@@ -104,22 +88,18 @@ jobs:
10488 echo "⚠ Builds differ (this is expected currently)"
10589 echo "See .containerization/README.adoc for details"
10690 fi
107-
10891 security-scan :
10992 runs-on : ubuntu-latest
11093 timeout-minutes : 15
11194 needs : container-build
112-
11395 steps :
11496 - name : Checkout
11597 uses : actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v4
116-
11798 - name : Download artifact
11899 uses : actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v4
119100 with :
120101 name : fireflag-extension-${{ github.sha }}
121102 path : artifacts/
122-
123103 - name : Scan extension archive
124104 run : |
125105 # Unzip and scan contents
@@ -133,7 +113,6 @@ jobs:
133113 echo "Verifying manifest..."
134114 jq empty /tmp/extension/manifest.json
135115 jq '.manifest_version == 3' /tmp/extension/manifest.json
136-
137116 - name : Run TruffleHog
138117 uses : trufflesecurity/trufflehog@37b77001d0174ebec2fcca2bd83ff83a6d45a3ab # v3
139118 with :
0 commit comments