mirror of
https://github.com/freedomofpress/dangerzone.git
synced 2025-05-17 18:51:50 +02:00
Compare commits
8 commits
7f27c652fc
...
0e817902da
Author | SHA1 | Date | |
---|---|---|---|
0e817902da | |||
![]() |
3f560fd29a | ||
![]() |
02fb6c07a4 | ||
![]() |
74f4fbbbde | ||
![]() |
033e8fef88 | ||
![]() |
1ec51c7b4c | ||
![]() |
93b95dbb59 | ||
![]() |
c407e2ff84 |
3 changed files with 93 additions and 10 deletions
23
.github/workflows/check_repos.yml
vendored
23
.github/workflows/check_repos.yml
vendored
|
@ -46,21 +46,30 @@ jobs:
|
|||
apt update
|
||||
apt-get install python-all -y
|
||||
|
||||
- name: Add GPG key for the packages.freedom.press
|
||||
- name: Add packages.freedom.press PGP key (gpg)
|
||||
if: matrix.version != 'trixie'
|
||||
run: |
|
||||
apt-get update && apt-get install -y gnupg2 ca-certificates
|
||||
dirmngr # NOTE: This is a command that's necessary only in containers
|
||||
# The key needs to be in the GPG keybox database format so the
|
||||
# signing subkey is detected by apt-secure.
|
||||
gpg --keyserver hkps://keys.openpgp.org \
|
||||
--no-default-keyring --keyring ./fpf-apt-tools-archive-keyring.gpg \
|
||||
--recv-keys "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281"
|
||||
|
||||
# Export the GPG key in armor mode because sequoia needs it this way
|
||||
# (sqv is used on debian trixie by default to check the keys)
|
||||
mkdir -p /etc/apt/keyrings/
|
||||
gpg --no-default-keyring --keyring ./fpf-apt-tools-archive-keyring.gpg \
|
||||
--armor --export "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281" \
|
||||
> /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg
|
||||
mv ./fpf-apt-tools-archive-keyring.gpg /etc/apt/keyrings/.
|
||||
|
||||
- name: Add packages.freedom.press PGP key (sq)
|
||||
if: matrix.version == 'trixie'
|
||||
run: |
|
||||
apt-get update && apt-get install -y ca-certificates sq
|
||||
mkdir -p /etc/apt/keyrings/
|
||||
# On debian trixie, apt-secure uses `sqv` to verify the signatures
|
||||
# so we need to retrieve PGP keys and store them using the base64 format.
|
||||
sq network keyserver \
|
||||
--server hkps://keys.openpgp.org \
|
||||
search "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281" \
|
||||
--output /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg
|
||||
- name: Add packages.freedom.press to our APT sources
|
||||
run: |
|
||||
. /etc/os-release
|
||||
|
|
63
.github/workflows/release-container-image.yml
vendored
Normal file
63
.github/workflows/release-container-image.yml
vendored
Normal file
|
@ -0,0 +1,63 @@
|
|||
# This action listens on new tags, generates a new container image
|
||||
# sign it and upload it to the container registry.
|
||||
|
||||
name: Release container image
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- "container-image/**"
|
||||
branches:
|
||||
- "test/image-**"
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
id-token: write
|
||||
packages: write
|
||||
contents: read
|
||||
attestations: write
|
||||
|
||||
env:
|
||||
REGISTRY: ghcr.io/${{ github.repository_owner }}
|
||||
REGISTRY_USER: ${{ github.actor }}
|
||||
REGISTRY_PASSWORD: ${{ github.token }}
|
||||
IMAGE_NAME: dangerzone/dangerzone
|
||||
|
||||
jobs:
|
||||
build-container-image:
|
||||
runs-on: ubuntu-24.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Check it's working
|
||||
run: |
|
||||
git describe --long --first-parent
|
||||
|
||||
- name: Login to GitHub Container Registry
|
||||
uses: docker/login-action@v3
|
||||
with:
|
||||
registry: ${{ env.REGISTRY }}
|
||||
username: USERNAME
|
||||
password: ${{ github.token }}
|
||||
|
||||
- name: Build and push the dangerzone image
|
||||
id: build-image
|
||||
run: |
|
||||
sudo apt-get install -y python3-poetry
|
||||
python3 ./install/common/build-image.py
|
||||
echo ${{ github.token }} | podman login ghcr.io -u USERNAME --password-stdin
|
||||
|
||||
# Load the image with the final name directly
|
||||
gunzip -c share/container.tar.gz | podman load
|
||||
FINAL_IMAGE_NAME="${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}"
|
||||
TAG=$(git describe --long --first-parent | tail -c +2)
|
||||
podman tag dangerzone.rocks/dangerzone:$TAG "$FINAL_IMAGE_NAME"
|
||||
podman push "$FINAL_IMAGE_NAME" --digestfile=digest
|
||||
echo "digest=$(cat digest)" >> "$GITHUB_OUTPUT"
|
||||
|
||||
- name: Generate artifact attestation
|
||||
uses: actions/attest-build-provenance@v1
|
||||
with:
|
||||
subject-name: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
||||
subject-digest: "${{ steps.build-image.outputs.digest }}"
|
||||
push-to-registry: true
|
17
INSTALL.md
17
INSTALL.md
|
@ -84,9 +84,20 @@ Dangerzone is available for:
|
|||
</tr>
|
||||
</table>
|
||||
|
||||
Add our repository following these instructions:
|
||||
First, retrieve the PGP keys.
|
||||
|
||||
Download the GPG key for the repo:
|
||||
Starting with Trixie, follow these instructions to download the PGP keys:
|
||||
|
||||
```bash
|
||||
sudo apt-get update && sudo apt-get install sq -y
|
||||
mkdir -p /etc/apt/keyrings/
|
||||
sq network keyserver \
|
||||
--server hkps://keys.openpgp.org \
|
||||
search "DE28 AB24 1FA4 8260 FAC9 B8BA A7C9 B385 2260 4281" \
|
||||
--output /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg
|
||||
```
|
||||
|
||||
On other Debian-derivatives:
|
||||
|
||||
```sh
|
||||
sudo apt-get update && sudo apt-get install gnupg2 ca-certificates -y
|
||||
|
@ -99,7 +110,7 @@ sudo gpg --no-default-keyring --keyring ./fpf-apt-tools-archive-keyring.gpg \
|
|||
> /etc/apt/keyrings/fpf-apt-tools-archive-keyring.gpg
|
||||
```
|
||||
|
||||
Add the URL of the repo in your APT sources:
|
||||
Then, on all distributions, add the URL of the repo in your APT sources:
|
||||
|
||||
```sh
|
||||
. /etc/os-release
|
||||
|
|
Loading…
Reference in a new issue