2020-11-16 14:34:19 -06:00
name : Update changelog
on :
workflow_dispatch :
inputs :
version :
2021-12-21 07:34:05 -06:00
required : true
2023-05-30 10:10:09 -05:00
description: 'Needs to match, exactly, the name of a milestone. The version to be released please respect: major.minor.patch, major.minor.patch-preview or major.minor.patch-preview<number> format. example : 7.4 .3 , 7.4 .3 -preview or 7.4.3-preview1'
2023-04-27 02:37:52 -05:00
skip_pr :
required : false
default : "0"
skip_community_post :
required : false
default : "0"
2020-11-16 14:34:19 -06:00
jobs :
2023-08-02 06:25:23 -05:00
config :
runs-on : "ubuntu-latest"
outputs :
has-secrets : ${{ steps.check.outputs.has-secrets }}
steps :
- name : "Check for secrets"
id : check
shell : bash
run : |
if [ -n "${{ (secrets.GRAFANA_DELIVERY_BOT_APP_ID != '' &&
secrets.GRAFANA_DELIVERY_BOT_APP_PEM != '' &&
secrets.GRAFANA_MISC_STATS_API_KEY != '' &&
secrets.GRAFANABOT_FORUM_KEY != ''
) || '' }}" ]; then
echo "has-secrets=1" >> "$GITHUB_OUTPUT"
fi
2020-11-16 14:34:19 -06:00
main :
2023-08-02 06:25:23 -05:00
needs : config
if : needs.config.outputs.has-secrets
2020-11-16 14:34:19 -06:00
runs-on : ubuntu-latest
steps :
2023-06-21 04:06:56 -05:00
- name : "Generate token"
id : generate_token
uses : tibdex/github-app-token@b62528385c34dbc9f38e5f4225ac829252d1ea92
with :
app_id : ${{ secrets.GRAFANA_DELIVERY_BOT_APP_ID }}
private_key : ${{ secrets.GRAFANA_DELIVERY_BOT_APP_PEM }}
2023-04-27 02:37:52 -05:00
- name : Run update changelog (manually invoked)
uses : grafana/grafana-github-actions-go/update-changelog@main
2021-12-20 07:16:22 -06:00
with :
2023-06-21 04:06:56 -05:00
token : ${{ steps.generate_token.outputs.token }}
2023-04-27 02:37:52 -05:00
version : ${{ inputs.version }}
metrics_api_key : ${{ secrets.GRAFANA_MISC_STATS_API_KEY }}
community_api_key : ${{ secrets.GRAFANABOT_FORUM_KEY }}
community_api_username : grafanabot
skip_pr : ${{ inputs.skip_pr }}
skip_community_post : ${{ inputs.skip_community_post }}