File tree Expand file tree Collapse file tree 8 files changed +145
-0
lines changed
Expand file tree Collapse file tree 8 files changed +145
-0
lines changed Original file line number Diff line number Diff line change 1+ version : 2
2+ updates :
3+
4+ - package-ecosystem : github-actions
5+ directory : /
6+ schedule :
7+ interval : monthly
Original file line number Diff line number Diff line change 1+ changelog :
2+ exclude :
3+ labels :
4+ - ignore-for-release
5+ authors :
6+ - dependabot
7+ categories :
8+ - title : Breaking Changes 🛠
9+ labels :
10+ - semver-major
11+ - breaking-change
12+ - title : New Features 🎉
13+ labels :
14+ - semver-minor
15+ - enhancement
16+ - title : Other Changes
17+ labels :
18+ - ' *'
Original file line number Diff line number Diff line change 1+ name : CI
2+ on :
3+ pull_request :
4+ push :
5+ branches : [main]
6+
7+ jobs :
8+ test :
9+ runs-on : ubuntu-latest
10+ steps :
11+ - uses : actions/checkout@v3
12+ - name : Create test package
13+ uses : secondlife/action-nfpm@v1
14+ - uses : ./
15+ id : debserver
16+ with :
17+ path : dist
18+ - name : Check output
19+ env :
20+ PORT : ${{ steps.debserver.outputs.port }}
21+ run : |
22+ fatal() {
23+ echo "$@" > /dev/stderr
24+ exit 1
25+ }
26+ test -f Packages || fatal "Missing Packages"
27+ test -f Packages.gz || fatal "Missing Packages.gz"
28+ test -f Packages.bz2 || fatal "Missing Packages.bz2"
29+ curl -sf http://localhost:$PORT/Packages || fatal "Unable to cURL http://localhost:$PORT/Packages"
Original file line number Diff line number Diff line change 1+ name : Release
2+
3+ on :
4+ release :
5+ types : [published]
6+
7+ jobs :
8+ Tag :
9+ uses : secondlife/update-major-tag-workflow/.github/workflows/update-major-tag.yaml@v1
Original file line number Diff line number Diff line change 1+ dist
Original file line number Diff line number Diff line change 1+ # action-debserver
2+
3+ Incredibly basic debserver action which:
4+
5+ 1 . Scans a target directory for * .debs using ` dpkg-scanpackages ` to produce
6+ package indexes
7+ 2 . Starts a simple HTTP server using ` python -m http.server `
8+
9+ There are several limitations to this action, notable: it requires
10+ dpkg-scanpackages and python3 to be installed. This is true of Github's
11+ ubuntu runners, but may not be of self-hosted and non-linux hosts.
12+
13+ ## Example
14+
15+ ``` yaml
16+ name : CI
17+ on :
18+ pull_request :
19+ push :
20+ branches : [main]
21+
22+ jobs :
23+ test :
24+ runs-on : ubuntu-latest
25+ steps :
26+ - uses : actions/checkout@v3
27+ - name : Build package
28+ uses : secondlife/action-nfpm@v1
29+ - uses : secondlife/action-debserver@v1
30+ with :
31+ path : dist
32+ - uses : secondlife/action-build-docker@v1
33+ with :
34+ image : secondlife/my-image
35+ build-args : local_debian_repository_url=http://172.17.0.1:12321
36+ ` ` `
Original file line number Diff line number Diff line change 1+ name : Start debserver
2+ description : Index a folder containing debian packages and run a debserver
3+ inputs :
4+ port :
5+ description : Server HTTP port
6+ default : 12321
7+ path :
8+ description : Path to folder with debian packages
9+ outputs :
10+ port :
11+ description : Port of HTTP server
12+ value : ${{ steps.debserver.outputs.port }}
13+ pid :
14+ description : PID of HTTP server
15+ value : ${{ steps.debserver.outputs.pid }}
16+ runs :
17+ using : composite
18+ steps :
19+ - name : Index packages and start server
20+ id : debserver
21+ shell : bash
22+ env :
23+ FOLDER : ${{ inputs.folder }}
24+ PORT : ${{ inputs.port }}
25+ run : |
26+ set -e
27+ cd "$FOLDER"
28+ dpkg-scanpackages -m . > Packages
29+ bzip2 Packages --force --keep
30+ gzip Packages --force --keep
31+ python3 -m http.server $PORT &
32+ echo "pid=$?" >> $GITHUB_OUTPUT
33+ echo "port=$PORT" >> $GITHUB_OUTPUT
Original file line number Diff line number Diff line change 1+ # See https://nfpm.goreleaser.com/configuration for more information
2+ name : nfpm-example
3+ arch : all
4+ platform : linux
5+ version : ${VERSION}
6+ section : devel
7+ priority : extra
8+ maintainer :
slcorps <[email protected] > 9+ description : |
10+ Example debian/linux package using nFPM.
11+ homepage : https://github.com/secondlife/debian-template
12+ license : Proprietary
You can’t perform that action at this time.
0 commit comments