Skip to content

APT Repository Update Workflow #36

@mairas

Description

@mairas

Create workflow to automatically notify APT repository when a release is published (adapted from HALPI2-firmware).

Implementation details:

Create .github/workflows/release-published.yml (adapted from HALPI2-firmware/release.yml):

Trigger: Release published (not draft, not pre-release)

Actions:

  • Extract version from release tag (strip leading 'v')
  • Trigger repository dispatch to apt.hatlabs.fi repository
  • Send payload with package name, version, and source repository

Required Secret:

  • APT_REPO_PAT - Personal Access Token with repo dispatch permissions

Workflow:

on:
  release:
    types: [published]

jobs:
  notify-apt-repo:
    - Extract version from tag
    - Trigger repository dispatch
      - Repository: hatlabs/apt.hatlabs.fi
      - Event type: package-updated
      - Payload: {package: "halpid", version: "<version>", repository: "<repo>"}

Test scenarios:

  • Publishing a draft release triggers APT repo update
  • Version is correctly extracted from tag (v5.0.0 -> 5.0.0)
  • Repository dispatch is sent successfully
  • APT repo receives and processes the notification

Acceptance criteria:

  • Workflow file created and committed
  • Triggers only on published releases (not drafts/pre-releases)
  • Version extraction works correctly
  • Repository dispatch configured correctly
  • APT_REPO_PAT secret configured in repository settings
  • Workflow adapted from HALPI2-firmware/release.yml

Caveats:

  • Requires PAT secret configured in repository settings
  • PAT must have repo scope for repository dispatch
  • APT repository must be configured to handle package-updated events
  • Only triggers on published releases, not when editing release notes

Dependencies:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions