Skip to content

Commit 629a9ac

Browse files
committed
Add initial project layout
0 parents  commit 629a9ac

File tree

6 files changed

+206
-0
lines changed

6 files changed

+206
-0
lines changed

.github/dependabot.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: /
6+
schedule:
7+
interval: daily

.github/workflows/test.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-FileCopyrightText: 2024 Paul Colby <[email protected]>
2+
# SPDX-License-Identifier: MIT
3+
4+
name: CI
5+
6+
on:
7+
- push
8+
- pull_request
9+
10+
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- run: yamllint .
16+
17+
test-defaults:
18+
runs-on: ${{ matrix.os }}
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: ./
22+
- run: linuxdeploy-x86_64.AppImage --list-plugins
23+
strategy:
24+
matrix:
25+
os:
26+
- ubuntu-20.04
27+
- ubuntu-22.04
28+
- ubuntu-24.04
29+
fail-fast: false
30+
31+
test-options:
32+
runs-on: ${{ matrix.os }}
33+
env:
34+
INSTALL_DIR: ${{ \todo }}
35+
steps:
36+
- uses: actions/checkout@v4
37+
- name: Test defaults
38+
uses: ./
39+
with:
40+
- name: Check result
41+
run: "${DIR}/linuxdeploy-x86_64.AppImage" --list-plugins
42+
# \todo check other stuff too.
43+
with:
44+
dir: ..
45+
strategy:
46+
matrix:
47+
os:
48+
- ubuntu-20.04
49+
- ubuntu-22.04
50+
- ubuntu-24.04
51+
fail-fast: false

.yamllint.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# SPDX-FileCopyrightText: 2024 Paul Colby <[email protected]>
2+
# SPDX-License-Identifier: MIT
3+
4+
extends: default
5+
6+
rules:
7+
comments:
8+
min-spaces-from-content: 1
9+
document-start:
10+
present: false
11+
line-length:
12+
max: 120
13+
truthy:
14+
check-keys: false

LICENSE.md

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) 2024 Paul Colby
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.

README.md

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# `install-linuxdeploy-action`
2+
3+
[![CI](https://github.com/pcolby/install-linuxdeploy-action/actions/workflows/test.yaml/badge.svg?branch=main)](
4+
https://github.com/pcolby/pcolby/install-linuxdeploy-action/actions/workflows/test.yaml)
5+
6+
GitHub Action for installing [linuxdeploy] with optional plugins.
7+
8+
## Usage
9+
10+
```yaml
11+
- uses: pcolby/install-linuxdeploy-action@v1
12+
```
13+
14+
## Options
15+
16+
### `arch`
17+
18+
The target architecture to install [linuxdeploy] for. This can be any architecture that [linuxdeploy] releases binaries
19+
for, but typically you'd want to leave it to default to `x86_64`.
20+
21+
### `dir`
22+
23+
The target directory to install [linuxdeploy] to. Defaults to `${GITHUB_WORKSPACE}/linuxdeploy`.
24+
25+
### `install-deps`
26+
27+
Whether or not to install known `apt` dependencies. Defaults to `true`.
28+
29+
### `plugins`
30+
31+
Space-separated list of optional [linuxdeploy] plugins to install. Any plugins directly listed in the
32+
[Awesome linuxdeploy!] listing should be supported, such as `appimage` and `qt`.
33+
34+
### `set-env`
35+
36+
Whether or not to update the `$PATH` environment variable to include the installation `dir`. Defaults to `true`.
37+
38+
### `version`
39+
40+
The [linuxdeploy] version to install, as well as the _default_ version for any `plugins` entries that don't specify a
41+
version.
42+
43+
> [!IMPORTANT]
44+
> Currently this defaults to `continuous`, as [linuxdeploy] currently has no official stable release, but at some point
45+
> this will likely default to the most recent, current, tested stable [linuxdeploy] version.
46+
47+
### Example with all options
48+
49+
```
50+
- name: Install linuxdeploy
51+
uses: pcolby/install-linuxdeploy-action@v1
52+
with:
53+
arch: x86_64
54+
dir: ${{ github.workspace }}/linuxdeploy
55+
install-deps: true
56+
plugins: qt
57+
set-env: true
58+
version: continuous
59+
```
60+
61+
[Awesome linuxdeploy!]: https://github.com/linuxdeploy/awesome-linuxdeploy
62+
[linuxdeploy]: https://github.com/linuxdeploy/linuxdeploy

action.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-FileCopyrightText: 2024 Paul Colby <[email protected]>
2+
# SPDX-License-Identifier: MIT
3+
4+
name: Summarize Test Results
5+
6+
author: Paul Colby
7+
8+
description: Summarise TAP (Test Anything Protocol) test results
9+
10+
inputs:
11+
arch:
12+
description: Target architecture to install linuxdeploy
13+
default: x86_64
14+
dir:
15+
description: Target directory to install linuxdeploy
16+
required: false
17+
install-deps:
18+
description: Install known OS dependencies
19+
default: true
20+
plugins:
21+
description: Additional linuxdeploy plugins to install
22+
required: false
23+
set-env:
24+
description: Add the installed directory to the $PATH environment variable
25+
default: true
26+
version:
27+
description: Version of linudeploy to install
28+
default: continuous
29+
30+
runs:
31+
using: composite
32+
steps:
33+
- run: |
34+
set -o errexit -o noclobber -o nounset -o pipefail
35+
[[ ${INPUTS_INSTALL_DEPS}" = 'false' ]] || echo '\todo: install dependencies'
36+
# \todo Build URLs list, and binaries list (using arch, plugins, version)
37+
curl --create-dirs --location --output-dir "${INPUTS_DIR}" --remote-name-all "${urls[@}}"
38+
chmod a+x "${binaries}"
39+
[[ "${INPUTS_SET_ENV}" = 'false' ]] || tee -a "${GITHUB_PATH}" <<< "${INPUTS_DIR}"
40+
shell: bash
41+
env:
42+
INPUTS_ARCH: ${{ inputs.arch }}
43+
INPUTS_DIR: ${{ inputs.dir }}
44+
INPUTS_INSTALL_DEPS: ${{ inputs.install-deps }}
45+
INPUTS_PLUGINS: ${{ inputs.plugins }}
46+
INPUTS_SET_ENV: ${{ inputs.set-env }}
47+
INPUTS_VERSION: ${{ inputs.version }}
48+
49+
branding:
50+
color: green
51+
icon: package

0 commit comments

Comments
 (0)