This takes over two more settings we have in the lnd repo. The first is
to cancel existing CI runs for the same PR if it is pushed again before
the previous run has completed.
The second is just for consistency, to make sure all shells are bash
shells.
This attempts to fix the following error that sometimes occurs on the
GitHub runners:
go: github.com/lightninglabs/lightning-terminal imports
github.com/lightningnetwork/lnd/kvdb imports
github.com/lightningnetwork/lnd/kvdb/etcd imports
go.etcd.io/etcd/server/v3/embed: mkdir /home/runner/go/pkg/mod/cache/download/go.etcd.io/etcd/server: permission denied
The suspicion is that the lint step that runs as root within docker
changes the permissions of some of the module cache directories.
So by simply changing the order of operations, this should be fixed.
Later on we will want to run the unit tests against different backends.
When that is the case, we can just add a new unit_type to this matrix
instead of needing to repeat all the same set-up steps.
To fix the issue that currently prevents the second image (with the /lit
path prefix) to be built and pushed (both for releases and nightly
builds), we clear the build cache between builds.
Added a daily schedule to the Docker workflow to automate builds and
pushes of the `daily-testing` image. This change introduces a new cron
job that runs every day at midnight (UTC) and triggers the workflow.
The linter was disabled before due to a bug. Since the bug was likely
caused by an issue with a go module in a dependency project which was
updated in the meantime, we attempt to re-enable the linter in the CI
now.
We run into an issue with the linter that couldn't be fixed yet:
level=error msg="Running error: 1 error occurred:\n\t* can't run linter goanalysis_metalinter: buildir: failed to load package loopdb: could not load export data: no export data for \"github.com/lightninglabs/loop/loopdb\"\n\n"
We disable the linter for now until we find out what the problem is.
We want to allow users to use LiT under a custom path to make it easier
to integrate LiT in bundled software such as BTCPayServer. Because the
custom path prefix must be known at build time, we create an additional
docker image that uses the static /lit path as the prefix.
To avoid leaking any sensitive information like Docker Hub credentials
because of compromised actions repositories, we use our own, vendored
actions for all steps that potentially touch sensitive information.
To disincentivize users of 32bit machines to use lnd, we removed the
ARMv7 (32bit) target for docker images there. It therefore doesn't make
sense to provide LiT images for 32bit machines either.
To make sure the compiled protos in the git repository are always up to
date, we add a GitHub action that checks them by compiling and diffing
the files.
We add a GitHub workflow that is triggered whenever a new version tag is
pushed. It will trigger a docker image build for that version and
automatically push it to the specified repo.