ooni-probe-cli/.github/workflows/oohelperd.yml
Federico Ceratto 8e26dbae8e
oohelperd packaging and CI (#374)
Closes https://github.com/ooni/backend/issues/499

Co-authored-by: Simone Basso <bassosimone@gmail.com>
2021-06-15 15:53:22 +02:00

43 lines
1.3 KiB
YAML

# oohelperd builds oohelperd for Linux
name: oohelperd
on:
push:
branches:
- "release/**"
jobs:
build_amd64:
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: "1.16.4"
- name: build oohelperd binary
run: GOOS=linux GOARCH=amd64 go build -v ./internal/cmd/oohelperd
- run: find . -type f -name oohelperd
- name: install deps
run: |
sudo apt-get -q update
sudo apt-get install -yq --no-install-recommends curl devscripts \
dpkg-dev debhelper git python3 python3-requests python3-gnupg s3cmd
- name: build deb package
run: |
cd ./internal/cmd/oohelperd
dpkg-buildpackage -us -uc -b
- name: upload package
run: |
curl -fsSLO https://raw.githubusercontent.com/ooni/sysadmin/master/tools/debops-ci
chmod +x debops-ci
find . -name '*.deb'
./debops-ci --show-commands upload --bucket-name ooni-internal-deb --arch "amd64" internal/cmd/*.deb
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DEB_GPG_KEY: ${{ secrets.DEB_GPG_KEY }}