Skip to content

Commit

Permalink
add override param, refs #5
Browse files Browse the repository at this point in the history
Signed-off-by: morph027 <stefan.heitmueller@gmx.com>
  • Loading branch information
morph027 committed Sep 16, 2024
1 parent 1c735e4 commit bb7ab45
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ Can be deployed to GH pages using [upload-pages-artifact](https://github.com/act
| `import-from-repo-url` | `false` | `n/a` | Import existing packages from this repo url. Workaround for immutable GH actions cache. |
| `maintainer` | `false` | `apt-repo-action@${GITHUB_REPOSITORY_OWNER}` | Package maintainer for keyring package. |
| `homepage` | `false` | `${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}` | Homepage for keyring package. |
| `override` | `false` | `n/a` | Optional override file (see [man page](https://manpages.debian.org/unstable/reprepro/reprepro.1.en.html#OVERRIDE_FILES)) |

## Outputs

Expand Down
4 changes: 4 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ inputs:
description: >-
Homepage for keyring package.
If unset, defaults to ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}
override:
description: >-
Optional override file (see [man page](https://manpages.debian.org/unstable/reprepro/reprepro.1.en.html#OVERRIDE_FILES))
outputs:
dir:
description: >-
Expand Down Expand Up @@ -118,3 +121,4 @@ runs:
SIGNING_KEY: ${{ inputs.signing-key }}
MAINTAINER: ${{ inputs.maintainer }}
HOMEPAGE: ${{ inputs.homepage }}
OVERRIDE: ${{ inputs.override }}
7 changes: 6 additions & 1 deletion repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ architectures="${ARCHITECTURES:-amd64}"
limit="${LIMIT:-0}"
maintainer="${MAINTAINER:-apt-repo-action@${GITHUB_REPOSITORY_OWNER}}"
homepage="${HOMEPAGE:-${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}}"
# shellcheck disable=SC2153
override="${OVERRIDE}"
reprepro_basedir="reprepro -b ${tmpdir}/.repo/${repo_name}"
reprepro="${reprepro_basedir} -C ${components}"

Expand Down Expand Up @@ -70,8 +72,11 @@ else
echo "Architectures: ${architectures}"
echo "SignWith: ${fingerprints[*]}"
echo "Limit: ${limit}"
echo ""
) >>"${tmpdir}/.repo/${repo_name}/conf/distributions"
if [[ -n "${override}" ]]; then
echo "DebOverride: ${override##*/}"
cp "${override}" "${tmpdir}/.repo/${repo_name}/conf/${override##*/}"
fi
fi

if ! grep -q "^Components:.*${components}" "${tmpdir}/.repo/${repo_name}/conf/distributions"; then
Expand Down

0 comments on commit bb7ab45

Please sign in to comment.