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
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "test/**"
|
||||
schedule:
|
||||
- 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
|
||||
on:
|
||||
pull_request:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
- "test/**"
|
||||
pull_request:
|
||||
schedule:
|
||||
- cron: "2 0 * * *" # Run every day at 02:00 UTC.
|
||||
workflow_dispatch:
|
||||
|
@ -26,7 +25,24 @@ concurrency:
|
|||
cancel-in-progress: true
|
||||
|
||||
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:
|
||||
needs: should-run
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: debian:bookworm
|
||||
|
@ -45,6 +61,8 @@ jobs:
|
|||
# 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.
|
||||
build-container-image:
|
||||
needs: should-run
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
@ -69,6 +87,8 @@ jobs:
|
|||
python3 ./install/common/build-image.py
|
||||
|
||||
download-tessdata:
|
||||
needs: should-run
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
name: Download and cache Tesseract data
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -95,6 +115,8 @@ jobs:
|
|||
runs-on: windows-latest
|
||||
needs:
|
||||
- download-tessdata
|
||||
- should-run
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
env:
|
||||
DUMMY_CONVERSION: 1
|
||||
steps:
|
||||
|
@ -126,6 +148,8 @@ jobs:
|
|||
runs-on: ${{ matrix.runner }}
|
||||
needs:
|
||||
- download-tessdata
|
||||
- should-run
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
@ -154,7 +178,9 @@ jobs:
|
|||
|
||||
build-deb:
|
||||
needs:
|
||||
- should-run
|
||||
- build-container-image
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
name: "build-deb (${{ matrix.distro }} ${{ matrix.version }})"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
|
@ -226,6 +252,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-deb
|
||||
- should-run
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
@ -281,6 +309,8 @@ jobs:
|
|||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-container-image
|
||||
- should-run
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
distro: ["fedora"]
|
||||
|
@ -346,6 +376,8 @@ jobs:
|
|||
needs:
|
||||
- build-container-image
|
||||
- download-tessdata
|
||||
- should-run
|
||||
if: needs.should-run.outputs.run-workflow == 'true'
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
|
|
Loading…
Reference in a new issue