-
Notifications
You must be signed in to change notification settings - Fork 594
Update mimir-prometheus on branch pushes #11518
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
base: main
Are you sure you want to change the base?
Update mimir-prometheus on branch pushes #11518
Conversation
This comment has been minimized.
This comment has been minimized.
d3a57c5
to
6b4b612
Compare
run: | | ||
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then | ||
# For repository_dispatch, use the branch_name from client_payload for mimir_prometheus_branch. | ||
# The main use case is for weekly branches, so we just use the same branch name here too. | ||
MIMIR_PROMETHEUS_BRANCH="${{ github.event.client_payload.branch_name }}" | ||
MIMIR_BRANCH=$MIMIR_PROMETHEUS_BRANCH | ||
echo "Triggered by repository_dispatch" | ||
echo "Using mimir-prometheus branch from payload: $MIMIR_PROMETHEUS_BRANCH" | ||
else | ||
# For workflow_dispatch, use the input values | ||
MIMIR_BRANCH="${{ inputs.mimir_branch }}" | ||
MIMIR_PROMETHEUS_BRANCH="${{ inputs.mimir_prometheus_branch }}" | ||
echo "Triggered by workflow_dispatch" | ||
echo "Using input values - mimir branch: $MIMIR_BRANCH, mimir-prometheus branch: $MIMIR_PROMETHEUS_BRANCH" | ||
fi | ||
|
||
echo "mimir_branch=$MIMIR_BRANCH" >> $GITHUB_OUTPUT | ||
echo "mimir_prometheus_branch=$MIMIR_PROMETHEUS_BRANCH" >> $GITHUB_OUTPUT |
Check failure
Code scanning / zizmor
github.event.client_payload.branch_name may expand into attacker-controllable code
run: | | ||
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then | ||
# For repository_dispatch, use the branch_name from client_payload for mimir_prometheus_branch. | ||
# The main use case is for weekly branches, so we just use the same branch name here too. | ||
MIMIR_PROMETHEUS_BRANCH="${{ github.event.client_payload.branch_name }}" | ||
MIMIR_BRANCH=$MIMIR_PROMETHEUS_BRANCH | ||
echo "Triggered by repository_dispatch" | ||
echo "Using mimir-prometheus branch from payload: $MIMIR_PROMETHEUS_BRANCH" | ||
else | ||
# For workflow_dispatch, use the input values | ||
MIMIR_BRANCH="${{ inputs.mimir_branch }}" | ||
MIMIR_PROMETHEUS_BRANCH="${{ inputs.mimir_prometheus_branch }}" | ||
echo "Triggered by workflow_dispatch" | ||
echo "Using input values - mimir branch: $MIMIR_BRANCH, mimir-prometheus branch: $MIMIR_PROMETHEUS_BRANCH" | ||
fi | ||
|
||
echo "mimir_branch=$MIMIR_BRANCH" >> $GITHUB_OUTPUT | ||
echo "mimir_prometheus_branch=$MIMIR_PROMETHEUS_BRANCH" >> $GITHUB_OUTPUT |
Check failure
Code scanning / zizmor
inputs.mimir_branch may expand into attacker-controllable code
run: | | ||
if [ "${{ github.event_name }}" = "repository_dispatch" ]; then | ||
# For repository_dispatch, use the branch_name from client_payload for mimir_prometheus_branch. | ||
# The main use case is for weekly branches, so we just use the same branch name here too. | ||
MIMIR_PROMETHEUS_BRANCH="${{ github.event.client_payload.branch_name }}" | ||
MIMIR_BRANCH=$MIMIR_PROMETHEUS_BRANCH | ||
echo "Triggered by repository_dispatch" | ||
echo "Using mimir-prometheus branch from payload: $MIMIR_PROMETHEUS_BRANCH" | ||
else | ||
# For workflow_dispatch, use the input values | ||
MIMIR_BRANCH="${{ inputs.mimir_branch }}" | ||
MIMIR_PROMETHEUS_BRANCH="${{ inputs.mimir_prometheus_branch }}" | ||
echo "Triggered by workflow_dispatch" | ||
echo "Using input values - mimir branch: $MIMIR_BRANCH, mimir-prometheus branch: $MIMIR_PROMETHEUS_BRANCH" | ||
fi | ||
|
||
echo "mimir_branch=$MIMIR_BRANCH" >> $GITHUB_OUTPUT | ||
echo "mimir_prometheus_branch=$MIMIR_PROMETHEUS_BRANCH" >> $GITHUB_OUTPUT |
Check failure
Code scanning / zizmor
inputs.mimir_prometheus_branch may expand into attacker-controllable code
This comment has been minimized.
This comment has been minimized.
6b4b612
to
182e520
Compare
😢 zizmor failed with exit code 14. Expand for full output
|
Signed-off-by: Dimitar Dimitrov <[email protected]>
Signed-off-by: Dimitar Dimitrov <[email protected]>
13f7290
to
4e78462
Compare
Signed-off-by: Dimitar Dimitrov <[email protected]>
This pull request enhances the
update-vendored-mimir-prometheus.yml
workflow by introducing support for triggering updates viarepository_dispatch
events triggered by grafana/mimir-prometheus#877