Skip to content

Test build source package, build binary package and smoke test on CI.… #1

Test build source package, build binary package and smoke test on CI.…

Test build source package, build binary package and smoke test on CI.… #1

Workflow file for this run

name: Build and Publish to APT
on:
release:
types: [published]
workflow_dispatch:
inputs:
tag_name:
description: "Release tag name for testing (e.g., 2.1.2)"
required: true
default: ""
build_dists:
description: "Distributions to build for (comma-separated, e.g., focal,jammy, noble)"
required: false
default: "focal,jammy,noble"
smoke_test_images:
description: "Docker images for smoke testing (comma-separated, e.g., ubuntu:20.04,ubuntu:22.04,ubuntu:24.04)"
required: false
default: "ubuntu:20.04,ubuntu:22.04,ubuntu:24.04"
jobs:
common-build:
uses: ./.github/workflows/common-build.yml # Calls the common workflow
with:
build_dists: ${{ inputs.build_dists }}
build_archs: ${{ inputs.build_archs }}
smoke_test_images: ${{ inputs.smoke_test_images }}

Check failure on line 27 in .github/workflows/publish-to-apt.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/publish-to-apt.yml

Invalid workflow file

You have an error in your yaml syntax on line 27
publish-to-apt:
env:
DEB_S3_VERSION: "0.11.3"
runs-on: ubuntu-latest
environment: build
needs: smoke-test-packages
steps:
- name: Setup APT Signing key
run: |
mkdir -m 0700 -p ~/.gnupg
echo "$APT_SIGNING_KEY" | gpg --import
env:
APT_SIGNING_KEY: ${{ secrets.APT_SIGNING_KEY }}
- name: Get binary packages
uses: actions/download-artifact@v4
- name: Setup ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "2.7"
- name: Install deb-s3
run: |
curl -sLO https://github.com/deb-s3/deb-s3/releases/download/${{ env.DEB_S3_VERSION }}/deb-s3-${{ env.DEB_S3_VERSION }}.gem
gem install deb-s3-${{ env.DEB_S3_VERSION }}.gem
- name: Quick hack to deal with duplicate _all packages
run: |
# Quick hack to deal with duplicate _all packages
rm -f binary-*-i386/*_all.deb
- name: List all packages to be uploaded
run: |
for dir in binary-*; do \
dist=$(echo $dir | cut -d- -f 2) ; \
ls -lha $dir/*.deb ; \
done
- name: Upload packages
# We stop here on the workflow dispatch smoke tests and on the preleases
if: github.event_name == 'release' && github.event.release.prerelease == false
run: |
for dir in binary-*; do \
dist=$(echo $dir | cut -d- -f 2) ; \
deb-s3 upload \
--bucket ${{ secrets.APT_S3_BUCKET }} \
--s3-region ${{ secrets.APT_S3_REGION }} \
--codename $dist \
--preserve-versions \
--fail-if-exists \
--sign \
--prefix deb \
$dir/*.deb ; \
done
env:
AWS_ACCESS_KEY_ID: ${{ secrets.APT_S3_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.APT_S3_SECRET_ACCESS_KEY }}