-
Notifications
You must be signed in to change notification settings - Fork 194
37 lines (32 loc) · 987 Bytes
/
build-on-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: build-on-pr
on:
pull_request_target:
branches:
- master
paths-ignore:
- '.github/**'
- 'metadata/**'
types: [opened, reopened, synchronize]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: pull request
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.sha }}
- name: packages
id: packages
run: |
packages=$( git diff --diff-filter="ACMR" --name-only ${{ github.event.pull_request.base.sha }} \
| grep -E '.*\/.*\/.*\.ebuild$' \
| xargs -I{} dirname {} | sort | uniq | tr '\n' ' ' )
echo "::set-output name=packages::$packages"
echo "emerge $packages"
- name: docker
uses: liangyongxiang/emerge-action@v0.1
with:
packages: "${{ steps.packages.outputs.packages }}"