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

[Backport release-24.11] workflows: small refactors #372939

Merged
merged 10 commits into from
Jan 11, 2025

Conversation

wolfgangwalther
Copy link
Contributor

Manual backport of #371216. I left out the two commits touching only the periodic-merge workflow, because this is a scheduled workflow running only from the master branch anyway.

With this, we don't have any diff between the workflow files on master and release-24.11 right now, except for the periodic-merge ofc.

This seems to be unused. It can be triggered manually, but is this
really done?

Is this superseded by the new eval checks or should we instead run this
regularly?

(cherry picked from commit aa7335c)
(cherry picked from commit 4d00c68)
All other workflows do - and most importantly actionlint only runs on
.yml files!

(cherry picked from commit fcb24b9)
mergedSha is available from needs.get-merge-commit, not needs.attrs.
Actionlint rightfully complains about that.

The code still works as expected because nixpkgs/ is checked out at
mergedSha, so the diff will be between mergedSha and baseSha.

(cherry picked from commit 72fd375)
Same top-level ordering of keys / empty lines and same indentation for
yaml lists. One blank line between each step.

Makes it easier to read and compare the workflows.

(cherry picked from commit 88afad8)
The eval-aliases job is independent of attrs already.

(cherry picked from commit 94c4c7b)
No need for that limitation, which only artifically limits test-ability
of CI in forks.

Some other workflows like backports, cherry-pick checks and periodic
merges are very specific to the release branches and don't need to be
run in forks.

(cherry picked from commit b64d5e1)
It seems odd to exclude PRs against release branches for those checks -
especially when not excluding PRs against staging-** variants at the
same time.

(cherry picked from commit 58f8c53)
We currently use two different "base" commits, but the same name. One of
them is the commit in which context the pull_request_target runs. The
other is the parent of the merge commit. Those are **not** necessarily
the same - see README introduced in the next commit for details.

Renaming one of them for clarity. Since the pull_request_target related
base commit is also called like that in GitHub Actions terminology, we
rename the other. The best I could come up with is "target".

(cherry picked from commit 3e9f5c0)
This introduces some basic concepts used in these workflows and a common
terminology.

At the same time we remove some of the comments from various workflow
files, because they are assumed to be "general knowledge" through the
README.

(cherry picked from commit 9ea7422)
@github-actions github-actions bot added 6.topic: policy discussion 6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions labels Jan 11, 2025
@wolfgangwalther wolfgangwalther mentioned this pull request Jan 11, 2025
13 tasks
@github-actions github-actions bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Jan 11, 2025
@wolfgangwalther
Copy link
Contributor Author

Confirmed the cherry-pick diff is only about periodic-merge.

@wolfgangwalther wolfgangwalther merged commit 9c65167 into release-24.11 Jan 11, 2025
18 of 19 checks passed
@wolfgangwalther wolfgangwalther deleted the backport-371216-to-release-24.11 branch January 11, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
6.topic: continuous integration Affects continuous integration (CI) in Nixpkgs, including Ofborg and GitHub Actions 6.topic: policy discussion 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant