dpage / winpgbuild

A repo containing Github actions for building PostgreSQL and it's dependencies on Windows
1 stars 2 forks source link

Specifying the versions in action.json #28

Closed davecramer closed 2 months ago

davecramer commented 2 months ago

This seems to work. I will fill in all the rest of the versions and change the location of action.yml

Thoughts ? @dpage @anarazel

dpage commented 2 months ago

That seems like a reasonable approach, though I think it would be more maintainable if we could use a JSON file as the source of the version info; for example, if we had something like:

{
  "packages": [
    {
      "name": "openssl",
      "version": "3.0.13",
      "source": "https://openssl.org/source/openssl-3.0.14.tar.gz",
      "licence": "https://www.openssl.org/source/apache-license-2.0.txt"
    },
    {
      "name": "krb5",
      "version": "1.21.3",
      "source": "https://kerberos.org/dist/krb5/1.21/krb5-1.21.3.tar.gz",
      "licence": "https://web.mit.edu/kerberos/krb5-1.21/doc/mitK5license.html"
    }
  ]
}

Then we could trivially set variables for <name>_<*>, giving us access to any info we might need about any package to use it and to record a manifest for users.

davecramer commented 2 months ago

I have no issue with this as long as it can be used in by another repository easily. I like being able to provide the source and license and any other metadata we may want

dpage commented 2 months ago

If we keep the JSON file in the root of the repo, and the action code to read it somewhere in there too, I don't see that being a problem. I believe we can reference the reusable action in the same repo with something like:

uses: ./.github/workflows/{filename}

(see https://docs.github.com/en/actions/using-workflows/reusing-workflows#calling-a-reusable-workflow)

davecramer commented 2 months ago

If I have time today I'll try that

davecramer commented 2 months ago

@dpage so have this working but so far I don't see a way to build this as a re-usable workflow from a different repository. I tried it in https://github.com/davecramer/testbuildpostgres and I have to have the manifest.json in that repository. I'm out of ideas. I suspect the only way it would work would be to specify the version in each yml file .

davecramer commented 2 months ago

I've tested all the workflows except postgresql-dev. I can rebase this to get rid of the commits and the merge this in.

I'd also like to figure out a way to output the versions in a human readable format