elastic / elastic/elasticsearch-specification

[Meta] GitHub Actions improvements

Open
#2,201 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
158
Forks
136
Avg merge
19h 48m
Merged PRs (30d)
54

Description

There are a few minor issues with our GitHub Actions in this repository:

1. The backport workflow uses `secrets.GITHUB_TOKEN`. In consequence, any PR created by the backport action won't run PR checks. This is a documented limitation of the default `GITHUB_TOKEN`. It's not allowed to implicitly trigger any workflow to avoid unwanted loops. In addition, some backports failed due to branch protection rules (e.g. the `workflows` permission was missing for the `GITHUB_TOKEN` which prevents it from being used to modify/add/remove workflow files).

2. In some of our workflows we are using `secrets.PAT`. This one belongs to a regular user (me) and not to a technical one (e.g. elasticmachine). This makes it hard to check if a workflow was triggered by an automation or an actual user (`github.actor == 'elasticmachine'`) as we can never be sure the action was not really triggered by the user if we compare the actor to his username.

Contributor guide

Open the contributing guide

Research direction

Start by locating the backport workflow and the other workflow files that reference secrets.PAT. Review how their token permissions, pull-request checks, and actor detection currently behave. Done means the documented backport and automation-identification problems are addressed without weakening workflow protections.

Written by the indexing model from the issue text.

Assessment

Tech stack
github-actions
Domain
ci-cd
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.