When releasing, since the job pushes to the git repository, it needs
to have write permission on "contents".
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Set the GitHub Actions token permission to null in most workflows.
This results in:
GITHUB_TOKEN Permissions
Metadata: read
The default permissions, used without the null override, are either
GITHUB_TOKEN Permissions
Actions: write
Checks: write
Contents: write
Deployments: write
Discussions: write
Issues: write
Metadata: read
Packages: write
Pages: write
PullRequests: write
RepositoryProjects: write
SecurityEvents: write
Statuses: write
or
GITHUB_TOKEN Permissions
Actions: read
Checks: read
Contents: read
Deployments: read
Discussions: read
Issues: read
Metadata: read
Packages: read
Pages: read
PullRequests: read
RepositoryProjects: read
SecurityEvents: read
Statuses: read
Jobs triggered by PRs get read permissions, other jobs get write.
One job requires non-null permissions to function.
The dependent issues GHA needs PR/issues write permissions to add/remove
`dependent` labels. It needs status write permission to block/unblock
PRs when dependencies are missing/met. Fails with HttpError otherwise.
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Per GitHub's security guidelines, GHAs should be pinned using full
length commit SHAs instead of tags.
The SHAs are of the commits currently resolved by the versions.
Even "trusted" GHAs from GitHub developers are pinned because it's
possible their repo rights could be compromised and a malicious GHA
published. These core repos are not frequently substantially updated.
Submariner-internal GHAs are left pinned at devel because we want
automatic updates from Shipyard's shared tooling.
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
Don't run jobs that aren't triggered on pull request on forks.
Forks aren't likely to need these jobs, and theyre more likely to fail
there.
Signed-off-by: Mike Kolesnik <mkolesni@redhat.com>
chart-releaser looks at the project history to determine whether a
chart changed, we mustn't limit the fetch depth.
Signed-off-by: Stephen Kitt <skitt@redhat.com>
Use the official Helm chart releasing GitHub Action instead of our
custom bash.
Travis CI can be removed after this commit, as all tests will have
equivalents for GHAs.
Closes: #71
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>