Skip to content

Commit

Permalink
feat: enable github action to test pull requests
Browse files Browse the repository at this point in the history
  • Loading branch information
khos2ow committed Jan 9, 2025
1 parent 67214d1 commit 8b48c77
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/test-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Test Pull Request

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
matrix-builder:
runs-on: ubuntu-24.04
outputs:
includes: ${{ steps.builder.outputs.includes }}
steps:
- name: Build Matrix
id: builder
uses: regolith-linux/actions/build-matrix@main
with:
name: "${{ github.event.repository.name }}"
ref: "${{ github.base_ref }}"
arch: "amd64" # only test on amd64 on pull requests
stage: "unstable"

build:
runs-on: ubuntu-24.04
needs: matrix-builder
container: "ghcr.io/regolith-linux/ci-${{ matrix.distro }}:${{ matrix.codename }}-${{ matrix.arch }}"
strategy:
fail-fast: false
matrix:
include: ${{ fromJSON(needs.matrix-builder.outputs.includes) }}
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Import GPG Key
uses: regolith-linux/actions/import-gpg@main
with:
gpg-key: "${{ secrets.PACKAGE_PRIVATE_KEY2 }}"

- name: Build Package
uses: regolith-linux/actions/build-package@main
with:
name: "${{ github.event.repository.name }}"
distro: "${{ matrix.distro }}"
codename: "${{ matrix.codename }}"
stage: "unstable"
suite: "unstable"
component: "main"
arch: "${{ matrix.arch }}"

0 comments on commit 8b48c77

Please sign in to comment.