5371c7f486
I am not 100% sure I was able to fix all the cases in which we need higher permissions than the strict default. At least, I tried. It may be reasonable to make an interim release to check whether I successfully fixed all the cases. Ref issue: https://github.com/ooni/probe/issues/2154
111 lines
4.4 KiB
YAML
111 lines
4.4 KiB
YAML
# Builds and publishes ooniprobe for Linux
|
|
name: linux
|
|
on:
|
|
push:
|
|
branches:
|
|
- "release/**"
|
|
tags:
|
|
- "v*"
|
|
|
|
jobs:
|
|
build_and_publish_386:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- run: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: ./mk ./CLI/ooniprobe-linux-386
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-386
|
|
- run: |
|
|
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
|
|
gh release create -p $tag --target $GITHUB_SHA || true
|
|
gh release upload $tag --clobber ./CLI/ooniprobe-linux-386
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
|
|
build_and_publish_amd64:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- run: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: ./mk ./CLI/ooniprobe-linux-amd64
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-amd64
|
|
- run: |
|
|
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
|
|
gh release create -p $tag --target $GITHUB_SHA || true
|
|
gh release upload $tag --clobber ./CLI/ooniprobe-linux-amd64
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_and_publish_armv7:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- run: sudo apt-get update -q
|
|
- run: sudo apt-get install -y qemu-user-static
|
|
- run: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: ./mk ./CLI/ooniprobe-linux-armv7
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-armv7
|
|
- run: |
|
|
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
|
|
gh release create -p $tag --target $GITHUB_SHA || true
|
|
gh release upload $tag --clobber ./CLI/ooniprobe-linux-armv7
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
build_and_publish_arm64:
|
|
runs-on: "ubuntu-20.04"
|
|
permissions: # See https://github.com/ooni/probe/issues/2154
|
|
contents: write
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- run: sudo apt-get update -q
|
|
- run: sudo apt-get install -y qemu-user-static
|
|
- run: |
|
|
echo -n $PSIPHON_CONFIG_KEY > ./internal/engine/psiphon-config.key
|
|
echo $PSIPHON_CONFIG_JSON_AGE_BASE64 | base64 -d > ./internal/engine/psiphon-config.json.age
|
|
env:
|
|
PSIPHON_CONFIG_KEY: ${{ secrets.PSIPHON_CONFIG_KEY }}
|
|
PSIPHON_CONFIG_JSON_AGE_BASE64: ${{ secrets.PSIPHON_CONFIG_JSON_AGE_BASE64 }}
|
|
- run: ./mk ./CLI/ooniprobe-linux-arm64
|
|
- run: ./E2E/ooniprobe.sh ./CLI/ooniprobe-linux-arm64
|
|
- run: |
|
|
tag=$(echo $GITHUB_REF | sed 's|refs/tags/||g')
|
|
gh release create -p $tag --target $GITHUB_SHA || true
|
|
gh release upload $tag --clobber ./CLI/ooniprobe-linux-arm64
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|