Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

publish: support user-defined metadata #1

Open
maxux opened this issue Aug 26, 2022 · 0 comments
Open

publish: support user-defined metadata #1

maxux opened this issue Aug 26, 2022 · 0 comments
Assignees

Comments

@maxux
Copy link
Collaborator

maxux commented Aug 26, 2022

Latest 0-flist now supports metadata settings. Because GitHub doesn't provide a way to accepts inputs not known in advance, it's difficult to let user-defined metadata to be set.

One workaround is specifying a file which would contains metadata. To make things easy because upload script is in bash, it's using environment variable inside a file which would be sourced:

export METADATA_VERSION="2.3.4"
export METADATA_DESCRIPTION="Testing GitHub Actions with flist metadata setter"
export METADATA_HOMEPAGE="http://www.google.com"
export METADATA_USER=$USER
export METADATA_HOSTNAME=$HOST

Snippet to nicely use them:

for entry in $(env | grep ^METADATA_ | awk -F'=' '{ print $1 }'); do
    single=${entry:9}
    key=${single,,}

    echo "$key => ${!entry}"
done
version => 2.3.4
description => Testing GitHub Actions with flist metadata setter
homepage => http://www.google.com
hostname => laptix
user => maxux

This is related to:

GitHub Actions integration would be required for:

@maxux maxux self-assigned this Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant