ooni-probe-cli/.github/workflows/oohelperd.yml
Simone Basso 4d80f7d9f0
[forwardport] chore: use go1.17.3 (#588) (#589)
This diff forward ports adcb0f9ae3b9e074c301d4f7f0e8f2d0ef6466b9.

Original commit message:

- - -

- ensure we use go1.17.3 in workflows

- update to a version of ooni/oohttp that uses go1.17.3

This change WILL need to be forward ported to master.

Closes https://github.com/ooni/probe/issues/1861
2021-11-10 14:18:04 +01:00

51 lines
1.6 KiB
YAML

# oohelperd builds and publishes oohelperd for Linux
name: oohelperd
on:
push:
branches:
- "release/**"
- "oohelperd-staging"
jobs:
build_amd64:
runs-on: "ubuntu-20.04"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v1
with:
go-version: "1.17.3"
- 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: update the debian changelog
run: |
version="$(go run ./internal/cmd/printversion)~$GITHUB_RUN_NUMBER"
cd ./internal/cmd/oohelperd
dch -v "$version" "New version ${version}"
- name: build deb package
run: |
cd ./internal/cmd/oohelperd
dpkg-buildpackage -us -uc -b
- name: upload package
if: github.ref == 'refs/heads/oohelperd-staging'
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 }}