Skip to content

Commit 9f5cd7b

Browse files
committed
add ci get from loathingKernel
1 parent 06feb13 commit 9f5cd7b

28 files changed

+1736
-0
lines changed
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: assets-delete
2+
description: Delete old assets from a release
3+
inputs:
4+
assets:
5+
description: List of assets to delete from a release in JSON format.
6+
required: true
7+
type: string
8+
release_tag:
9+
required: true
10+
type: string
11+
runs:
12+
using: 'composite'
13+
steps:
14+
- shell: bash
15+
run: |
16+
for file in $ASSETS
17+
do
18+
echo "Deleting asset $file"
19+
gh release delete-asset ${{ inputs.release_tag }} "$file" --yes || true
20+
done
21+
env:
22+
ASSETS: ${{ join(fromJSON(inputs.assets), ' ') }}
23+
GITHUB_TOKEN: ${{ github.token }}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: assets-upload
2+
description: Upload new assets to a release
3+
inputs:
4+
assets:
5+
description: List of assets to upload to a release in JSON format.
6+
required: true
7+
type: string
8+
release_tag:
9+
required: true
10+
type: string
11+
runs:
12+
using: 'composite'
13+
steps:
14+
- shell: bash
15+
run: |
16+
for file in $ASSETS
17+
do
18+
echo "Uploading asset $file"
19+
gh release upload ${{ inputs.release_tag }} "$file" --clobber
20+
done
21+
env:
22+
ASSETS: ${{ join(fromJSON(inputs.assets), ' ') }}
23+
GITHUB_TOKEN: ${{ github.token }}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.0.1
4+
hooks:
5+
- id: check-merge-conflict
6+
- id: check-yaml
7+
- id: end-of-file-fixer
8+
- id: trailing-whitespace
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM archlinux:base-devel
2+
3+
COPY entrypoint.sh /entrypoint.sh
4+
5+
ENTRYPOINT ["/entrypoint.sh"]

.github/actions/pkgbuild/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Eric Langlois
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

.github/actions/pkgbuild/README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# pkgbuild-action
2+
GitHub action to build and check a PKGBUILD package
3+
4+
## Features
5+
* Checks that .SRCINFO matches PKGBUILD if .SRCINFO exists
6+
* Builds package(s) with makepkg (configurable arguments)
7+
* Runs on a bare minimum Arch Linux install to help detect missing dependencies
8+
* Outputs built package archives
9+
* Checks PKGBUILD and package archives with [namcap](https://wiki.archlinux.org/index.php/namcap)
10+
11+
## Interface
12+
Inputs:
13+
* `pkgdir`: Relative path to directory containing the PKGBUILD file
14+
(repo root by default).
15+
* `aurDeps`: Support AUR dependencies if nonempty.
16+
* `namcapDisable`: Disable namcap checks if nonempty.
17+
* `namcapRules`: A comma-separated list of rules for namcap to run.
18+
* `namcapExcludeRules`: A comma-separated list of rules for namcap not to run.
19+
* `makepkgArgs`: Additional arguments to pass to `makepkg`.
20+
21+
Outputs:
22+
* `pkgfileN`: Filename of Nth built package archive (ordered as `makepkg --packagelist`).
23+
Empty if not built. N = 0, 1, ...
24+
25+
## Example Usage
26+
```yaml
27+
name: PKGBUILD CI
28+
29+
on: [push, pull_request]
30+
31+
jobs:
32+
pkgbuild:
33+
runs-on: ubuntu-latest
34+
steps:
35+
- name: Checkout
36+
uses: actions/checkout@v2
37+
- name: Makepkg Build and Check
38+
id: makepkg
39+
uses: edlanglois/pkgbuild-action@v1
40+
- name: Print Package Files
41+
run: |
42+
echo "Successfully created the following package archive"
43+
echo "Package: ${{ steps.makepkg.outputs.pkgfile0 }}"
44+
# Uncomment to upload the package as an artifact
45+
# - name: Upload Package Archive
46+
# uses: actions/upload-artifact@v2
47+
# with:
48+
# path: ${{ steps.makepkg.outputs.pkgfile0 }}
49+
```
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: Makepkg Build and Check
2+
author: Eric Langlois
3+
description: Build and check a PKGBUILD package
4+
branding:
5+
color: blue
6+
icon: chevron-up
7+
inputs:
8+
pkgdir:
9+
description: "Relative path to directory containing the PKGBUILD file."
10+
required: false
11+
default: "."
12+
pacmanConf:
13+
description: "Relative path to alternative configuration file for pacman."
14+
required: false
15+
default: ""
16+
aurDeps:
17+
description: "Support AUR dependencies if nonempty."
18+
required: false
19+
default: ""
20+
namcapDisable:
21+
description: "Disable namcap checks if nonempty."
22+
required: false
23+
default: ""
24+
namcapRules:
25+
description: "A comma-separated list of rules for namcap to run."
26+
required: false
27+
default: ""
28+
namcapExcludeRules:
29+
description: "A comma-separated list of rules for namcap not to run."
30+
required: false
31+
default: ""
32+
makepkgArgs:
33+
description: "Additional arguments to pass to makepkg."
34+
required: false
35+
default: ""
36+
makepkgConf:
37+
description: "Relative path to alternative configuration file for makepkg."
38+
required: false
39+
default: ""
40+
multilib:
41+
description: "Install 'multilib-devel' to build lib32 packages."
42+
required: false
43+
default: ""
44+
repoReleaseTag:
45+
description: "Tag to use as repository name."
46+
required: false
47+
default: ""
48+
useCcacheExt:
49+
description: "Install and use ccache-ext"
50+
required: false
51+
default: ""
52+
outputs:
53+
pkgfiles:
54+
description: "List of generated package archives in JSON format. Usually only one."
55+
oldfiles:
56+
description: "List of removed package archives in JSON format. Usually only one."
57+
repofiles:
58+
description: "List of repository files in JSON format."
59+
60+
runs:
61+
using: 'docker'
62+
image: 'Dockerfile'

0 commit comments

Comments
 (0)