mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-05 13:11:49 +02:00
Compare commits
2 commits
718d1404f4
...
feecc35eb2
Author | SHA1 | Date | |
---|---|---|---|
feecc35eb2 | |||
![]() |
2ba247e09c |
2 changed files with 34 additions and 6 deletions
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
|
@ -1,10 +1,6 @@
|
||||||
name: Build dev environments
|
name: Build dev environments
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- "test/**"
|
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *" # Run every day at 00:00 UTC.
|
- cron: "0 0 * * *" # Run every day at 00:00 UTC.
|
||||||
|
|
||||||
|
|
36
.github/workflows/ci.yml
vendored
36
.github/workflows/ci.yml
vendored
|
@ -1,10 +1,9 @@
|
||||||
name: Tests
|
name: Tests
|
||||||
on:
|
on:
|
||||||
pull_request:
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- "test/**"
|
pull_request:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "2 0 * * *" # Run every day at 02:00 UTC.
|
- cron: "2 0 * * *" # Run every day at 02:00 UTC.
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
@ -26,7 +25,24 @@ concurrency:
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
should-run:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
run-workflow: ${{ steps.check.outputs.run-workflow }}
|
||||||
|
steps:
|
||||||
|
- id: check
|
||||||
|
run: |
|
||||||
|
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
|
||||||
|
echo "run-workflow=true" >> $GITHUB_OUTPUT
|
||||||
|
elif [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" != "refs/heads/main" ]]; then
|
||||||
|
echo "run-workflow=true" >> $GITHUB_OUTPUT
|
||||||
|
else
|
||||||
|
echo "run-workflow=false" >> $GITHUB_OUTPUT
|
||||||
|
fi
|
||||||
|
|
||||||
run-lint:
|
run-lint:
|
||||||
|
needs: should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container:
|
container:
|
||||||
image: debian:bookworm
|
image: debian:bookworm
|
||||||
|
@ -45,6 +61,8 @@ jobs:
|
||||||
# This is already built daily by the "build.yml" file
|
# This is already built daily by the "build.yml" file
|
||||||
# But we also want to include this in the checks that run on each push.
|
# But we also want to include this in the checks that run on each push.
|
||||||
build-container-image:
|
build-container-image:
|
||||||
|
needs: should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
@ -69,6 +87,8 @@ jobs:
|
||||||
python3 ./install/common/build-image.py
|
python3 ./install/common/build-image.py
|
||||||
|
|
||||||
download-tessdata:
|
download-tessdata:
|
||||||
|
needs: should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
name: Download and cache Tesseract data
|
name: Download and cache Tesseract data
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
@ -95,6 +115,8 @@ jobs:
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs:
|
needs:
|
||||||
- download-tessdata
|
- download-tessdata
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
env:
|
env:
|
||||||
DUMMY_CONVERSION: 1
|
DUMMY_CONVERSION: 1
|
||||||
steps:
|
steps:
|
||||||
|
@ -126,6 +148,8 @@ jobs:
|
||||||
runs-on: ${{ matrix.runner }}
|
runs-on: ${{ matrix.runner }}
|
||||||
needs:
|
needs:
|
||||||
- download-tessdata
|
- download-tessdata
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -154,7 +178,9 @@ jobs:
|
||||||
|
|
||||||
build-deb:
|
build-deb:
|
||||||
needs:
|
needs:
|
||||||
|
- should-run
|
||||||
- build-container-image
|
- build-container-image
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
name: "build-deb (${{ matrix.distro }} ${{ matrix.version }})"
|
name: "build-deb (${{ matrix.distro }} ${{ matrix.version }})"
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
strategy:
|
strategy:
|
||||||
|
@ -226,6 +252,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build-deb
|
- build-deb
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
@ -281,6 +309,8 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
distro: ["fedora"]
|
distro: ["fedora"]
|
||||||
|
@ -346,6 +376,8 @@ jobs:
|
||||||
needs:
|
needs:
|
||||||
- build-container-image
|
- build-container-image
|
||||||
- download-tessdata
|
- download-tessdata
|
||||||
|
- should-run
|
||||||
|
if: needs.should-run.outputs.run-workflow == 'true'
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
|
|
Loading…
Reference in a new issue